• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

laingsimon / courage_scores / 21874874321

10 Feb 2026 05:11PM UTC coverage: 95.344% (-0.4%) from 95.698%
21874874321

push

github

web-flow
v3.2.15 (#1973)

8336 of 9184 branches covered (90.77%)

Branch coverage included in aggregate %.

51 of 120 new or added lines in 5 files covered. (42.5%)

4 existing lines in 2 files now uncovered.

14908 of 15195 relevant lines covered (98.11%)

217.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

33.33
/CourageScores/Services/Query/QueryExtensions.cs
1
using System.Reflection;
2
using System.Runtime.CompilerServices;
3
using CourageScores.Common;
4
using Microsoft.Azure.Cosmos;
5
using Newtonsoft.Json.Linq;
6

7
namespace CourageScores.Services.Query;
8

9
internal static class QueryExtensions
10
{
11
    public static async IAsyncEnumerable<T> EnumerateResults<T>(this FeedIterator<T> records, [EnumeratorCancellation] CancellationToken token)
12
    {
13
        while (records.HasMoreResults && !token.IsCancellationRequested)
2!
14
        {
NEW
15
            var record = await records.ReadNextAsync(token);
×
16

NEW
17
            foreach (var row in record)
×
18
            {
NEW
19
                if (token.IsCancellationRequested)
×
20
                {
21
                    break;
22
                }
23

NEW
24
                yield return row;
×
25
            }
26
        }
27
    }
2!
28

29
    public static IAsyncEnumerable<JToken> ExcludeCosmosProperties(this IAsyncEnumerable<JToken> items)
30
    {
31
        return items.SelectAsync(item =>
2✔
32
        {
2✔
NEW
33
            foreach (var property in item.Cast<JProperty>().ToArray())
×
34
            {
2✔
NEW
35
                if (property.Name.StartsWith("_"))
×
36
                {
2✔
NEW
37
                    property.Remove();
×
38
                }
2✔
39
            }
2✔
40

2✔
NEW
41
            return item;
×
42
        });
2✔
43
    }
44

45
    public static JObject GetError(this CosmosException exc)
46
    {
NEW
47
        var errorProperty = exc.GetType().GetProperty("Error", BindingFlags.Instance | BindingFlags.NonPublic)!;
×
NEW
48
        var error = errorProperty.GetValue(exc);
×
49

NEW
50
        return JObject.Parse(error!.ToString()!);
×
51
    }
52
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc