Skip to content

Commit 8a9def5

Browse files
committed
test: add timeout to vite re-use cache
Add timeout to wait for FS to stablize (cherry picked from commit e615de7)
1 parent 9d4d11c commit 8a9def5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/legacy-cli/e2e/tests/vite/reuse-dep-optimization-cache.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { setTimeout } from 'node:timers/promises';
12
import assert from 'node:assert';
23
import { findFreePort } from '../../utils/network';
34
import { execAndWaitForOutputToMatch, killAllProcesses, ng } from '../../utils/process';
@@ -28,6 +29,9 @@ export default async function () {
2829
const response = await fetch(`http://localhost:${port}/@vite/client`);
2930
assert(response.ok, `Expected 'response.ok' to be 'true'.`);
3031

32+
// Wait for vite to write to FS and stablize.
33+
await setTimeout(2_000);
34+
3135
// Terminate the dev-server
3236
await killAllProcesses();
3337

0 commit comments

Comments
 (0)