From 0fb49a70a20fadc3542dab00887b831610f67e2b Mon Sep 17 00:00:00 2001 From: Jakob Getz Date: Tue, 6 Feb 2024 16:27:30 +0900 Subject: [PATCH] dont run empty test lists --- tests/run-tests.cts | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/tests/run-tests.cts b/tests/run-tests.cts index 176966a5..ee715d8a 100644 --- a/tests/run-tests.cts +++ b/tests/run-tests.cts @@ -151,11 +151,12 @@ function writeSummary(type: string, testCount: number, successfull: number, roun } async function runNodeTests(names: string[], options) { - if (names.length > 0) { - console.log('==============') - console.log('Run node tests') - console.log('==============') + if (names.length === 0) { + return } + console.log('==============') + console.log('Run node tests') + console.log('==============') // ignore specific tests let filter = [ 'rust-tictactoe', @@ -202,13 +203,14 @@ function compareResults(testPath: string, traceString: string, replayTraceString } async function runOnlineTests(names: string[], options) { - if (names.length > 0) { - console.log('================') - console.log('Run online tests') - console.log('================') - console.log('WARNING: You need a working internet connection') - console.log('WARNING: Tests depend on third party websites. If those websites changed since this testsuite was created, it might not work') + if (names.length === 0) { + return } + console.log('================') + console.log('Run online tests') + console.log('================') + console.log('WARNING: You need a working internet connection') + console.log('WARNING: Tests depend on third party websites. If those websites changed since this testsuite was created, it might not work') // ignore specific tests let filter = [ 'ogv', // TODO: additional ER at end of original trace @@ -239,11 +241,12 @@ async function runOnlineTests(names: string[], options) { } async function runOfflineTests(names: string[], options) { - if (names.length > 0) { - console.log('=================') - console.log('Run offline tests') - console.log('=================') + if (names.length === 0) { + return } + console.log('=================') + console.log('Run offline tests') + console.log('=================') // ignore specific tests let filter = [ 'sqllite',