Skip to content

Commit 14144dd

Browse files
test(cli): give hooks 30 seconds on Windows too
Fixture cleanup runs in hooks under vitest's 10-second hook default, so the same slowdown could fail a run there. Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
1 parent c6dbe91 commit 14144dd

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎packages/cli/vitest.config.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import { defineConfig } from "vitest/config";
22

3+
const WINDOWS = process.platform === "win32";
4+
35
export default defineConfig({
46
test: {
57
environment: "node",
6-
// GitHub's Windows runners stall on filesystem work now and then, so a
7-
// test that takes milliseconds elsewhere can run past vitest's 5s default.
8-
testTimeout: process.platform === "win32" ? 30_000 : 5_000,
8+
// Windows CI runs sometimes go several times slower across the board,
9+
// and a fast test or its cleanup then runs past vitest's default limits.
10+
testTimeout: WINDOWS ? 30_000 : 5_000,
11+
hookTimeout: WINDOWS ? 30_000 : 10_000,
912
// Suite-wide telemetry guard, mirroring the reference repo's
1013
// repo-wide setting: any test that reaches production wiring
1114
// reading the real `process.env` (the bin's main(), which hands

0 commit comments

Comments
 (0)