Skip to content

Commit

Permalink
test: add timeout to vite re-use cache
Browse files Browse the repository at this point in the history
Add timeout to wait for FS to stablize

(cherry picked from commit e615de7)
  • Loading branch information
alan-agius4 committed Nov 7, 2023
1 parent 9d4d11c commit 8a9def5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { setTimeout } from 'node:timers/promises';
import assert from 'node:assert';
import { findFreePort } from '../../utils/network';
import { execAndWaitForOutputToMatch, killAllProcesses, ng } from '../../utils/process';
Expand Down Expand Up @@ -28,6 +29,9 @@ export default async function () {
const response = await fetch(`http://localhost:${port}/@vite/client`);
assert(response.ok, `Expected 'response.ok' to be 'true'.`);

// Wait for vite to write to FS and stablize.
await setTimeout(2_000);

// Terminate the dev-server
await killAllProcesses();

Expand Down

0 comments on commit 8a9def5

Please sign in to comment.