From 8e88108346970547b3a6d65c8728a057edf2a3e2 Mon Sep 17 00:00:00 2001 From: Aramis Sennyey Date: Wed, 2 Nov 2022 17:53:59 -0400 Subject: [PATCH] update test case. Signed-off-by: Aramis Sennyey --- packages/cli/src/serve.test.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/cli/src/serve.test.ts b/packages/cli/src/serve.test.ts index f43ea8053d..32a94370bd 100644 --- a/packages/cli/src/serve.test.ts +++ b/packages/cli/src/serve.test.ts @@ -20,6 +20,8 @@ import fetch from 'node-fetch'; import path from 'path'; import getPort from 'get-port'; +jest.setTimeout(150000); + const executeCommand = ( command: string, args: string[], @@ -100,11 +102,6 @@ const executeCommand = ( }); }; -const timeout = 100000; - -// Builds initially (with no cache) take a loooong time. -jest.setTimeout(timeout * 2); - const testProjectDir = path.resolve( __dirname, '__fixtures__/test-project/packages/app', @@ -133,7 +130,7 @@ describe('end-to-end', () => { const frontendPort = await getPort(); startEmitter.on('hit', async () => { const response = await fetch( - `http://localhost:3000/${frontendPort}/catalog`, + `http://localhost:${frontendPort}/test/catalog`, ); const text = await response.text(); startEmitter.emit('stop', 'SIGINT'); @@ -153,7 +150,8 @@ describe('end-to-end', () => { }, startEmitter, { - signalRegex: [/webpack compiled/], + // Need to match console colors as well, so use .* instead of just ' '. + signalRegex: [/compiled.*successfully/], }, );