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

kulshekhar / ts-jest / 4440110611

pending completion
4440110611

push

github

GitHub
build(deps): Update dependency eslint to ^8.36.0 (#4045)

930 of 1044 branches covered (89.08%)

Branch coverage included in aggregate %.

4055 of 4154 relevant lines covered (97.62%)

520.62 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'
3✔
2

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

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

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

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

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

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

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