Skip to content

Commit

Permalink
ignore timing-dependent line
Browse files Browse the repository at this point in the history
Hard to hit in CI
  • Loading branch information
isaacs committed Nov 14, 2023
1 parent e7da3e9 commit 6b2f7a3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/service/tsconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { resolve } from 'path'
import ts from 'typescript'
import { walkUp } from 'walk-up-path'
import { error, warn } from '../debug.js'
import { report } from './diagnostic.js'
import { readFile } from '../ts-sys-cached.js'
import { report } from './diagnostic.js'

const cwd = process.cwd()
const filename = process.env.TSIMP_PROJECT || 'tsconfig.json'
Expand All @@ -22,7 +22,8 @@ let loadedConfigJSON: string
// overridable just so we can test it without waiting 100ms per test
// in practice, this is more than fast enough for most cases.
/* c8 ignore start */
const STAT_FREQ = Number(process.env.TSIMP_CONFIG_DEBOUNCE ?? 100) || 100
const STAT_FREQ =
Number(process.env.TSIMP_CONFIG_DEBOUNCE ?? 100) || 100
/* c8 ignore stop */
let lastStat: number = -1 * STAT_FREQ
let mtime: number = -1
Expand All @@ -38,9 +39,11 @@ export const tsconfig = () => {
lastStat = performance.now()
return loadedConfig
}
/* c8 ignore start */
} else {
return loadedConfig
}
/* c8 ignore stop */
}

for (const dir of walkUp(cwd)) {
Expand Down

0 comments on commit 6b2f7a3

Please sign in to comment.