From dbca1971e04d91af0ce88cfce186bbbf34220463 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Sun, 2 Jul 2023 08:49:00 +0300 Subject: [PATCH] test: add missing assertions to test-runner-cli PR-URL: https://github.com/nodejs/node/pull/48593 Reviewed-By: Antoine du Hamel Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Yagiz Nizipli --- test/parallel/test-runner-cli.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/parallel/test-runner-cli.js b/test/parallel/test-runner-cli.js index 1af875e7e24def..60da7b67037456 100644 --- a/test/parallel/test-runner-cli.js +++ b/test/parallel/test-runner-cli.js @@ -32,6 +32,8 @@ const testFixtures = fixtures.path('test-runner'); assert.match(stdout, /not ok 2 - this should fail/); assert.match(stdout, /ok 3 - .+subdir.+subdir_test\.js/); assert.match(stdout, /ok 4 - this should pass/); + assert.match(stdout, /ok 5 - this should be skipped/); + assert.match(stdout, /ok 6 - this should be executed/); } { @@ -44,6 +46,8 @@ const testFixtures = fixtures.path('test-runner'); assert.match(stdout, /not ok 2 - this should fail/); assert.match(stdout, /ok 3 - .+subdir.+subdir_test\.js/); assert.match(stdout, /ok 4 - this should pass/); + assert.match(stdout, /ok 5 - this should be skipped/); + assert.match(stdout, /ok 6 - this should be executed/); assert.strictEqual(child.status, 1); assert.strictEqual(child.signal, null); assert.strictEqual(child.stderr.toString(), ''); @@ -91,6 +95,8 @@ const testFixtures = fixtures.path('test-runner'); assert.match(stdout, /not ok 2 - this should fail/); assert.match(stdout, /ok 3 - .+subdir.+subdir_test\.js/); assert.match(stdout, /ok 4 - this should pass/); + assert.match(stdout, /ok 5 - this should be skipped/); + assert.match(stdout, /ok 6 - this should be executed/); } { @@ -156,9 +162,12 @@ const testFixtures = fixtures.path('test-runner'); assert.match(stdout, /not ok 4 - level 0b/); assert.match(stdout, / {2}error: 'level 0b error'/); assert.match(stdout, /# tests 8/); + assert.match(stdout, /# suites 0/); assert.match(stdout, /# pass 4/); assert.match(stdout, /# fail 3/); + assert.match(stdout, /# cancelled 0/); assert.match(stdout, /# skipped 1/); + assert.match(stdout, /# todo 0/); } {