Skip to content

Commit 5c8762e

Browse files
committed
fix(test): raise tsc-compile timeout in type-compat test
The type-compat cases shell out to a full tsc compile of the source type graph (~6s on Node 20/22 CI runners), exceeding vitest's 5s default and timing out; the faster Node 24 runner masked it. Give both cases a 60s timeout, matching the project's other slow (browser) suites.
1 parent b42284d commit 5c8762e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

test/typeCompat.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,20 @@ function runTsc(projectDir: string): {ok: boolean; output: string} {
4646
}
4747
}
4848

49+
// Each case shells out to a full `tsc` compile of the source type graph, which
50+
// can take several seconds on slower CI runners — well past vitest's 5s default.
51+
const TSC_TIMEOUT_MS = 60_000;
52+
4953
describe('public type-surface compatibility', () => {
5054
it('public surface is API-compatible with the old hand-written surface', () => {
5155
const {ok, output} = runTsc(resolve(__dirname, 'typeCompat'));
5256
expect(output, output).toBe('');
5357
expect(ok).toBe(true);
54-
});
58+
}, TSC_TIMEOUT_MS);
5559

5660
it('the existing typings/test.tsx still compiles unchanged against the public surface', () => {
5761
const {ok, output} = runTsc(resolve(repoRoot, 'typings'));
5862
expect(output, output).toBe('');
5963
expect(ok).toBe(true);
60-
});
64+
}, TSC_TIMEOUT_MS);
6165
});

0 commit comments

Comments
 (0)