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

help-me-mom / ng-mocks / cb102152-75ac-4eea-9204-41000bfde55f

09 Feb 2024 01:47PM CUT coverage: 100.0%. Remained the same
cb102152-75ac-4eea-9204-41000bfde55f

push

circleci

web-flow
Merge pull request #8169 from help-me-mom/renovate/e2e/a17/patch-angular-cli-monorepo

3262 of 3262 branches covered (100.0%)

Branch coverage included in aggregate %.

4821 of 4821 relevant lines covered (100.0%)

8379.3 hits per line

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

100.0
/libs/ng-mocks/src/lib/common/core.def-stack.ts
1
import { mapEntries } from './core.helpers';
1✔
2

3
export default class<K, V> {
1✔
4
  protected stack: Array<Map<K, V>> = [];
3,237✔
5

6
  public constructor() {
7
    this.push();
3,237✔
8
  }
9

10
  public push() {
1✔
11
    this.stack.push(new Map());
18,652✔
12
  }
13

14
  public pop(): Map<V, V> {
1✔
15
    return this.stack.pop() ?? new Map();
15,417✔
16
  }
17

18
  public has(key: K): ReturnType<Map<K, V>['has']> {
1✔
19
    for (let i = this.stack.length - 1; i >= 0; i -= 1) {
130,330✔
20
      if (this.stack[i].has(key)) {
310,924✔
21
        return true;
63,528✔
22
      }
23
    }
24

25
    return false;
66,802✔
26
  }
27

28
  public get(key: K): ReturnType<Map<K, V>['get']> {
1✔
29
    for (let i = this.stack.length - 1; i >= 0; i -= 1) {
64,398✔
30
      if (this.stack[i].has(key)) {
67,084✔
31
        return this.stack[i].get(key);
63,624✔
32
      }
33
    }
34

35
    return undefined;
774✔
36
  }
37

38
  public set(key: K, value: V): this {
1✔
39
    for (let i = this.stack.length - 1; i >= 0; i -= 1) {
86,876✔
40
      this.stack[i].set(key, value);
248,583✔
41
    }
42

43
    return this;
86,876✔
44
  }
45

46
  public merge(resolutions: Map<K, V>): this {
1✔
47
    for (const [key, value] of mapEntries(resolutions)) {
49,182✔
48
      this.set(key, value);
49,182✔
49
    }
50

51
    return this;
2,333✔
52
  }
53
}
1✔
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