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

jumpinjackie / mapguide-react-layout / 15160437878

21 May 2025 11:00AM UTC coverage: 21.631% (-42.6%) from 64.24%
15160437878

Pull #1552

github

web-flow
Merge 8b7153d9e into 236e2ea07
Pull Request #1552: Feature/package updates 2505

839 of 1165 branches covered (72.02%)

11 of 151 new or added lines in 25 files covered. (7.28%)

1332 existing lines in 50 files now uncovered.

4794 of 22163 relevant lines covered (21.63%)

6.89 hits per line

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

68.97
/src/api/selection-count.ts
1
import { ClientSelectionSet } from "./contracts/common";
2
import { SelectedFeatureSet, FeatureSet } from "./contracts/query";
3

4
function isSelectedFeatureSet(ss: SelectedFeatureSet | FeatureSet): ss is SelectedFeatureSet {
6✔
5
    return (ss as any).SelectedLayer;
6✔
6
}
6✔
7

8
export function countSelection(mgSelection?: SelectedFeatureSet | FeatureSet, clientSelection?: ClientSelectionSet) {
1✔
9
    const summary = { total: 0, layerCount: 0 };
6✔
10
    if (mgSelection) {
6✔
11
        if (isSelectedFeatureSet(mgSelection)) {
6!
12
            summary.layerCount = mgSelection.SelectedLayer.length;
×
13
            for (const lyr of mgSelection.SelectedLayer) {
×
14
                summary.total += lyr.Feature?.length ?? 0;
×
UNCOV
15
            }
×
16
        } else {
6✔
17
            summary.layerCount = mgSelection.Layer.length;
6✔
18
            for (const lyr of mgSelection.Layer) {
6✔
19
                summary.total += lyr.Class?.ID?.length ?? 0;
8!
20
            }
8✔
21
        }
6✔
22
    }
6✔
23
    if (clientSelection) {
6!
24
        summary.layerCount = clientSelection.layers.length;
×
25
        for (const lyr of clientSelection.layers) {
×
26
            summary.total += lyr.features?.length ?? 0;
×
UNCOV
27
        }
×
UNCOV
28
    }
×
29
    if (summary.total == 0 && summary.layerCount == 0) {
6✔
30
        return undefined;
2✔
31
    }
2✔
32
    return summary;
4✔
33
}
4✔
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