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

atinc / ngx-tethys / 68ef226c-f83e-44c1-b8ed-e420a83c5d84

28 May 2025 10:31AM UTC coverage: 10.352% (-80.0%) from 90.316%
68ef226c-f83e-44c1-b8ed-e420a83c5d84

Pull #3460

circleci

pubuzhixing8
chore: xxx
Pull Request #3460: refactor(icon): migrate signal input #TINFR-1476

132 of 6823 branches covered (1.93%)

Branch coverage included in aggregate %.

10 of 14 new or added lines in 1 file covered. (71.43%)

11648 existing lines in 344 files now uncovered.

2078 of 14525 relevant lines covered (14.31%)

6.69 hits per line

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

25.81
/src/util/logger/logger.ts
1
import { isDevMode } from '@angular/core';
2

1✔
3
const record: Record<string, boolean> = {};
1✔
4

1✔
5
let logWarnDeprecation = true;
UNCOV
6

×
UNCOV
7
export const PREFIX = '[NGX-TETHYS]:';
×
UNCOV
8

×
9
function notRecorded(...args: any[]): boolean {
10
    const asRecord = args.reduce((acc, c) => acc + c.toString(), '');
UNCOV
11

×
UNCOV
12
    if (record[asRecord]) {
×
13
        return false;
14
    } else {
15
        record[asRecord] = true;
UNCOV
16
        return true;
×
UNCOV
17
    }
×
18
}
19

20
function consoleCommonBehavior(consoleFunc: (...args: any) => void, ...args: any[]): void {
21
    if (isDevMode() && notRecorded(...args)) {
1✔
22
        consoleFunc(...args);
23
    }
1✔
UNCOV
24
}
×
UNCOV
25

×
UNCOV
26
// Warning should only be printed in dev mode and only once.
×
UNCOV
27
export const warn = (...args: any[]) => consoleCommonBehavior((...arg: any[]) => console.warn(PREFIX, ...arg), ...args);
×
28

29
export function createWarnDeprecation(prefix: string): (...args: any[]) => void {
30
    return (...args: any[]) => {
31
        const stack = new Error().stack;
32
        return consoleCommonBehavior(
1✔
33
            (...arg: any[]) => {
34
                if (logWarnDeprecation) {
1✔
UNCOV
35
                    console.warn(prefix, 'deprecated:', ...arg, stack);
×
UNCOV
36
                }
×
37
            },
38
            ...args
39
        );
40
    };
1✔
41
}
42

43
export const warnDeprecation = createWarnDeprecation(PREFIX);
44

45
// Log should only be printed in dev mode.
46
export const log = (...args: any[]) => {
47
    if (isDevMode()) {
48
        console.log(PREFIX, ...args);
49
    }
50
};
51

52
export function setWarnDeprecation(enabled: boolean) {
53
    logWarnDeprecation = enabled;
54
}
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