Skip to content

Commit 401ada6

Browse files
fengmk2claude
andauthored
test: allow time for the Playwright type check on slow runners (#3082)
`checks Playwright options with only declared dependencies available` in `packages/cli/src/__tests__/exports-map.spec.ts` timed out on all three attempts of `CLI E2E test (Linux x64 musl)` on the `release: v1.3.0` PR (#3079), and passed on the other platforms. This PR gives it a 15 s timeout, the same as the slow template test in `register-template.spec.ts`. It is the first test in the file to run a full TypeScript program, so it also pays for TypeScript's warm-up. On the musl runner it normally stays under the 5 s default, but it has little margin: | Run | Test | Whole `exports-map.spec.ts` | | --- | --- | ---: | | `main` (6 recent runs) | 1847 to 3432 ms | 19.9 s | | #3079 (3 attempts) | 5206 to 5496 ms (timed out) | 29.1 s | Every test in the file ran slower on the #3079 runner, not only this one, so the failure comes from runner speed rather than from the release changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent afbe4a2 commit 401ada6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎packages/cli/src/__tests__/exports-map.spec.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ function typeDiagnostics(source: string, separator: string = path.sep): string[]
5959
}
6060

6161
describe('package.json exports map', () => {
62+
// The first full type check in this file takes up to about 3 s on the Alpine musl
63+
// runner, so a slow runner pushes it past Vitest's 5 s default.
6264
it('checks Playwright options with only declared dependencies available', () => {
6365
const directory = fs.mkdtempSync(path.join(os.tmpdir(), 'vite-plus-provider-types-'));
6466
try {
@@ -110,7 +112,7 @@ alias({ contextOptions: { reducedMotion: 'bogus' } });
110112
} finally {
111113
fs.rmSync(directory, { recursive: true, force: true });
112114
}
113-
});
115+
}, 15_000);
114116

115117
it('provides the bundled Vitest Vite peer without relying on project dependencies', () => {
116118
const pkg = JSON.parse(fs.readFileSync(cliPkgJsonPath, 'utf8'));

0 commit comments

Comments
 (0)