Skip to content

Commit

Permalink
test: add missing assertions to test-runner-cli
Browse files Browse the repository at this point in the history
PR-URL: #48593
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
  • Loading branch information
MoLow committed Jul 2, 2023
1 parent 1936160 commit 50477fa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/parallel/test-runner-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/);
}

{
Expand All @@ -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(), '');
Expand Down Expand Up @@ -87,6 +91,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/);
}

{
Expand Down Expand Up @@ -152,9 +158,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/);
}

{
Expand Down

0 comments on commit 50477fa

Please sign in to comment.