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

fmfe / vue-class-setup / #224

19 Jul 2024 06:39AM UTC coverage: 97.806% (+0.3%) from 97.542%
#224

push

travis-pro

lzxb
release: vue-class-setup@1.4.3

150 of 160 branches covered (93.75%)

Branch coverage included in aggregate %.

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

2 existing lines in 1 file now uncovered.

608 of 615 relevant lines covered (98.86%)

14.3 hits per line

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

92.45
/src/setup-reference.ts
1
let count = 0;
1✔
2
let isOpen = false;
1✔
3

1✔
4
export function add() {
1✔
5
    if (isOpen) {
33✔
6
        count = 1;
33✔
7
    } else {
2✔
8
        isOpen = true;
2✔
9
        count++;
33✔
10
    }
31✔
11
}
31✔
12

33✔
13
const weakMap = new WeakMap<object, number>();
1✔
14

1✔
15
export function popTarget(target: object): boolean {
1✔
16
    let count = weakMap.get(target);
1✔
17
    if (typeof count === 'number') {
33✔
18
        count--;
33✔
19
        if (count) {
33✔
20
            weakMap.set(target, count);
33✔
21
            return false;
7✔
22
        } else {
7✔
23
            weakMap.delete(target);
28✔
24
            isOpen = false;
26✔
25
            return true;
26✔
26
        }
26✔
27
    }
26✔
28
    return false;
33✔
29
}
33!
30

33✔
31
export function bindTarget(target: object) {
1✔
32
    if (count > 0) {
1✔
33
        weakMap.set(target, count);
26✔
34
        count = 0;
26✔
35
    } else {
26✔
36
        console.warn(`The instance did not use the '@Setup' decorator`);
26✔
37
    }
26!
UNCOV
38
}
×
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