Skip to content

Commit 50477fa

Browse files
authored
test: add missing assertions to test-runner-cli
PR-URL: #48593 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
1 parent 1936160 commit 50477fa

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/parallel/test-runner-cli.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ const testFixtures = fixtures.path('test-runner');
3232
assert.match(stdout, /not ok 2 - this should fail/);
3333
assert.match(stdout, /ok 3 - subdir.+subdir_test\.js/);
3434
assert.match(stdout, /ok 4 - this should pass/);
35+
assert.match(stdout, /ok 5 - this should be skipped/);
36+
assert.match(stdout, /ok 6 - this should be executed/);
3537
}
3638

3739
{
@@ -44,6 +46,8 @@ const testFixtures = fixtures.path('test-runner');
4446
assert.match(stdout, /not ok 2 - this should fail/);
4547
assert.match(stdout, /ok 3 - subdir.+subdir_test\.js/);
4648
assert.match(stdout, /ok 4 - this should pass/);
49+
assert.match(stdout, /ok 5 - this should be skipped/);
50+
assert.match(stdout, /ok 6 - this should be executed/);
4751
assert.strictEqual(child.status, 1);
4852
assert.strictEqual(child.signal, null);
4953
assert.strictEqual(child.stderr.toString(), '');
@@ -87,6 +91,8 @@ const testFixtures = fixtures.path('test-runner');
8791
assert.match(stdout, /not ok 2 - this should fail/);
8892
assert.match(stdout, /ok 3 - subdir.+subdir_test\.js/);
8993
assert.match(stdout, /ok 4 - this should pass/);
94+
assert.match(stdout, /ok 5 - this should be skipped/);
95+
assert.match(stdout, /ok 6 - this should be executed/);
9096
}
9197

9298
{
@@ -152,9 +158,12 @@ const testFixtures = fixtures.path('test-runner');
152158
assert.match(stdout, /not ok 4 - level 0b/);
153159
assert.match(stdout, / {2}error: 'level 0b error'/);
154160
assert.match(stdout, /# tests 8/);
161+
assert.match(stdout, /# suites 0/);
155162
assert.match(stdout, /# pass 4/);
156163
assert.match(stdout, /# fail 3/);
164+
assert.match(stdout, /# cancelled 0/);
157165
assert.match(stdout, /# skipped 1/);
166+
assert.match(stdout, /# todo 0/);
158167
}
159168

160169
{

0 commit comments

Comments
 (0)