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

IgniteUI / igniteui-angular / 13387853952

18 Feb 2025 09:55AM CUT coverage: 91.681% (+0.06%) from 91.622%
13387853952

Pull #14647

github

web-flow
Merge 54a18c10f into 10ddb05cf
Pull Request #14647: feat(query-builder): support for nested queries and other improvements

13326 of 15595 branches covered (85.45%)

901 of 977 new or added lines in 19 files covered. (92.22%)

1 existing line in 1 file now uncovered.

26881 of 29320 relevant lines covered (91.68%)

33936.7 hits per line

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

92.31
/projects/igniteui-angular/src/lib/test-utils/configure-suite.ts
1
import { TestBed, getTestBed, ComponentFixture, waitForAsync } from '@angular/core/testing';
2

3
/**
4
 * Per https://github.com/angular/angular/issues/12409#issuecomment-391087831
5
 * Destroy fixtures after each, reset testing module after all
6
 *
7
 * @hidden
8
 */
9

10
export const configureTestSuite = (configureAction?: () => TestBed) => {
2✔
11
    const testBed = getTestBed();
396✔
12
    const originReset = testBed.resetTestingModule;
396✔
13

14
    const clearStyles = () => {
396✔
15
        document.querySelectorAll('style').forEach(tag => tag.remove());
4,700✔
16
    };
17

18
    const clearSVGContainer = () => {
396✔
19
        document.querySelectorAll('svg').forEach(tag => tag.remove());
6,519✔
20
    };
21

22
    beforeAll(() => {
396✔
23
        testBed.resetTestingModule();
198✔
24
        testBed.resetTestingModule = () => testBed;
4,700✔
25
        jasmine.getEnv().allowRespy(true);
198✔
26
    });
27

28
    if (configureAction) {
396✔
29
        beforeAll(waitForAsync(() => {
144✔
30
            configureAction().compileComponents();
72✔
31
        }));
32
    }
33

34
    afterEach(() => {
396✔
35
        clearStyles();
4,700✔
36
        clearSVGContainer();
4,700✔
37
        (testBed as any)._activeFixtures.forEach((fixture: ComponentFixture<any>) => {
4,700✔
38
            const element = fixture.debugElement.nativeElement as HTMLElement;
132,290✔
39
            fixture.destroy();
132,290✔
40
            // If the fixture element ID changes, then it's not properly disposed
41
            element?.remove();
132,290✔
42
        });
43
        // reset ViewEngine TestBed
44
        (testBed as any)._instantiated = false;
4,700✔
45
        // reset Ivy TestBed
46
        (testBed as any)._testModuleRef = null;
4,700✔
47
    });
48

49
    afterAll(() => {
396✔
50
        testBed.resetTestingModule = originReset;
198✔
51
        testBed.resetTestingModule();
198✔
52
    });
53
};
54

55
const myReporter = {
2✔
56
    suiteStarted: function(result) {
57
        const id = new URLSearchParams(window.parent.location.search).get('id');
754✔
58
        console.log(`[${id}] Suite started: ${result.fullName}`);
754✔
59

60
    },
61

62
    suiteDone: function(result) {
63
        const id = new URLSearchParams(window.parent.location.search).get('id');
754✔
64
        console.log(`[${id}] Suite: ${result.fullName} has ${result.status}`);
754✔
65
        for (const expectation of result.failedExpectations) {
754✔
NEW
66
        console.log('Suite ' + expectation.message);
×
NEW
67
        console.log(expectation.stack);
×
68
        }
69
        var memory = (performance as any).memory;
754✔
70
        console.log(`[${id}] totalJSHeapSize: ${memory['totalJSHeapSize']} usedJSHeapSize: ${memory['usedJSHeapSize']} jsHeapSizeLimit: ${memory['jsHeapSizeLimit']}`);
754✔
71
        if (memory['totalJSHeapSize'] >= memory['jsHeapSizeLimit'] )
754!
NEW
72
            console.log( '--------------------Heap Size limit reached!!!-------------------');
×
73
    },
74
};
75
jasmine.getEnv().addReporter(myReporter);
2✔
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