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

kulshekhar / ts-jest / 12924273039

23 Jan 2025 07:25AM UTC coverage: 95.265%. Remained the same
12924273039

push

github

ahnpnl
build(deps): Update dependency @types/node to v20.17.15

774 of 871 branches covered (88.86%)

Branch coverage included in aggregate %.

4759 of 4937 relevant lines covered (96.39%)

1419.15 hits per line

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

92.5
/src/utils/ts-error.ts
1
import { inspect } from 'util'
6✔
2

6✔
3
import { BaseError } from 'make-error'
6✔
4

6✔
5
import { rootLogger } from './logger'
6✔
6
import { Errors, interpolate } from './messages'
6✔
7

6✔
8
const logger = rootLogger.child({ namespace: 'TSError' })
6✔
9

6✔
10
/**
6✔
11
 * @internal
6✔
12
 */
6✔
13
export const INSPECT_CUSTOM = inspect.custom || 'inspect'
6!
14

6✔
15
/**
6✔
16
 * TypeScript diagnostics error.
6✔
17
 *
6✔
18
 * @internal
6✔
19
 */
6✔
20
export class TSError extends BaseError {
6✔
21
  name = 'TSError'
6✔
22

6✔
23
  constructor(public diagnosticText: string, public diagnosticCodes: number[]) {
6✔
24
    super(
114✔
25
      interpolate(Errors.UnableToCompileTypeScript, {
114✔
26
        diagnostics: diagnosticText.trim(),
114✔
27
      }),
114✔
28
    )
114✔
29
    logger.debug({ diagnosticCodes, diagnosticText }, 'created new TSError')
114✔
30
    // ensure we blacklist any of our code
114✔
31
    Object.defineProperty(this, 'stack', { value: '' })
114✔
32
  }
114✔
33

6✔
34
  /* istanbul ignore next */
6✔
35
  [INSPECT_CUSTOM](): string {
6✔
36
    return this.diagnosticText
×
37
  }
×
38
}
6✔
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