Web Dev Solutions

Catalin Mititiuc

From 163e3a9de59f5d6a8df38fa32a1e7dc4db1ad024 Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Sat, 1 Jun 2024 17:50:58 -0700 Subject: Fix/refactor tests --- test/integration/setup.cjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/integration/setup.cjs') diff --git a/test/integration/setup.cjs b/test/integration/setup.cjs index 2ea9e63..cc68a59 100644 --- a/test/integration/setup.cjs +++ b/test/integration/setup.cjs @@ -1,7 +1,7 @@ console.log('\nSpawning server process...'); const { spawn } = require('child_process'); -module.exports = async function () { +module.exports = async function (globalConfig, projectConfig) { const child = spawn('node', ['server.cjs']); child.stdout.on('data', (data) => { @@ -13,7 +13,7 @@ module.exports = async function () { child.stderr.on('data', (data) => { const str = data.toString(); console.log('[server]', str); - if (str.includes('localhost:3005')) { + if (str.includes(projectConfig.globals.testServerUrl)) { setTimeout(resolve, 200); } }); -- cgit v1.2.3