From 1c2fe4b241c510e11dfb95b3c119f6a65073b00f Mon Sep 17 00:00:00 2001 From: cenfun Date: Sun, 31 Mar 2024 22:14:58 +0800 Subject: [PATCH] fixed koa request url --- test/test-node-koa.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test-node-koa.js b/test/test-node-koa.js index e71424bd..1ab3d10d 100644 --- a/test/test-node-koa.js +++ b/test/test-node-koa.js @@ -129,6 +129,7 @@ const generate = async () => { const cp = await startKoaProcess(port); if (!cp) { EC.logRed('can not start koa process'); + process.exit(1); return; } @@ -137,8 +138,12 @@ const generate = async () => { const [err, res] = await Util.request(url); if (err) { EC.logRed(`failed to request koa url: ${url}`); + console.log(err); + killSubProcess(cp); + process.exit(1); return; } + assert(res.data === 'Hello World'); // after webServer is debugging on ws://127.0.0.1:9229