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

atinc / ngx-tethys / d9ae709b-3c27-4b69-b125-b8b80b54f90b

pending completion
d9ae709b-3c27-4b69-b125-b8b80b54f90b

Pull #2757

circleci

mengshuicmq
fix: fix code review
Pull Request #2757: feat(color-picker): color-picker support disabled (#INFR-8645)

98 of 6315 branches covered (1.55%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

2392 of 13661 relevant lines covered (17.51%)

83.12 hits per line

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

88.46
/src/cascader/examples/cascader-address-options.ts
1
import * as _provinces from './_china-division/provinces.json';
2
import * as _cities from './_china-division/cities.json';
3
import * as _areas from './_china-division/areas.json';
4

1✔
5
const provincesAll = _provinces as any;
1✔
6
const citiesAll = _cities as any;
1✔
7
const areasAll = _areas as any;
1✔
8

1✔
9
const provinces = provincesAll.default;
1✔
10
const cities = citiesAll.default;
1✔
11
const areas = areasAll.default;
1,022,580✔
12

2,990!
13
areas.forEach((area: { cityCode: any; name: any; code: any }) => {
2,990✔
14
    const matchCity = cities.filter((city: { code: any }) => city.code === area.cityCode)[0];
2,990✔
15
    if (matchCity) {
16
        matchCity.children = [...(matchCity.children || [])];
17
        matchCity.children.push({
18
            label: area.name,
19
            value: area.code,
20
            isLeaf: true
21
        });
1✔
22
    }
10,602✔
23
});
342!
24

342✔
25
cities.forEach((city: { provinceCode: any; name: any; code: any; children: any }) => {
342✔
26
    const matchProvince = provinces.filter((province: { code: any }) => province.code === city.provinceCode)[0];
27
    if (matchProvince) {
28
        matchProvince.children = [...(matchProvince.children || [])];
29
        matchProvince.children.push({
30
            label: city.name,
31
            value: city.code,
32
            children: [...city.children]
31✔
33
        });
34
    }
35
});
36

37
const options = provinces.map((province: { name: any; code: any; children: any }) => ({
38
    label: province.name,
×
39
    value: province.code,
40
    children: [...province.children]
41
}));
42

43
function clone(obj: any) {
44
    return JSON.parse(JSON.stringify(obj));
45
}
46

47
export { options, clone };
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

© 2025 Coveralls, Inc