From aa4b2ff8844c84a1ae6809e9bdc07927f56599ec Mon Sep 17 00:00:00 2001 From: dengqichen Date: Tue, 11 Mar 2025 09:27:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=88=86=E6=89=B9=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E7=82=B9=E5=87=BB=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run-tests.bat | 3 +-- src/scripts/runTestsAndSendReport.js | 12 ++++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/run-tests.bat b/run-tests.bat index 922b2fd..c56e4e3 100644 --- a/run-tests.bat +++ b/run-tests.bat @@ -19,5 +19,4 @@ set NODE_ENV=%TEST_ENV% node src/scripts/runTestsAndSendReport.js echo. -echo [Batch] Execution completed -pause \ No newline at end of file +echo [Batch] Execution completed \ No newline at end of file diff --git a/src/scripts/runTestsAndSendReport.js b/src/scripts/runTestsAndSendReport.js index 657914f..d72e17c 100644 --- a/src/scripts/runTestsAndSendReport.js +++ b/src/scripts/runTestsAndSendReport.js @@ -117,7 +117,15 @@ async function runTestsAndSendReport() { console.log('[Node] =========================================='); console.log('[Node] Starting test automation process...'); console.log('[Node] =========================================='); -runTestsAndSendReport().catch(error => { +runTestsAndSendReport().then(() => { + console.log('[Node] Process will exit in 3 seconds...'); + setTimeout(() => { + process.exit(0); + }, 3000); +}).catch(error => { console.error('[Node] Fatal error:', error); - process.exit(1); + console.log('[Node] Process will exit in 3 seconds...'); + setTimeout(() => { + process.exit(1); + }, 3000); }); \ No newline at end of file