From 5370b036868c5668eec1d32a25ec41c25b486ecf Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Wed, 13 Dec 2023 09:43:07 +0000 Subject: [PATCH] test: delay `killAllProcesses` in serve test This was causing `Error: The service was stopped: write EPIPE` which caused the test to fail on Node.js 18. --- tests/legacy-cli/e2e/tests/basic/serve.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/legacy-cli/e2e/tests/basic/serve.ts b/tests/legacy-cli/e2e/tests/basic/serve.ts index e5f5af674475..91d1a8f38ccc 100644 --- a/tests/legacy-cli/e2e/tests/basic/serve.ts +++ b/tests/legacy-cli/e2e/tests/basic/serve.ts @@ -1,3 +1,4 @@ +import { setTimeout } from 'node:timers/promises'; import { killAllProcesses } from '../../utils/process'; import { ngServe } from '../../utils/project'; @@ -5,6 +6,8 @@ export default async function () { // Serve works without HMR const noHmrPort = await ngServe('--no-hmr'); await verifyResponse(noHmrPort); + + await setTimeout(500); await killAllProcesses(); // Serve works with HMR