Skip to content

Commit 6ec5798

Browse files
MoLowruyadorno
authored andcommittedSep 16, 2023
test: add missing assertions to test-runner-cli
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>
1 parent 989ea68 commit 6ec5798

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎test/parallel/test-runner-cli.js

+9
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(), '');
@@ -91,6 +95,8 @@ const testFixtures = fixtures.path('test-runner');
9195
assert.match(stdout, /not ok 2 - this should fail/);
9296
assert.match(stdout, /ok 3 - .+subdir.+subdir_test\.js/);
9397
assert.match(stdout, /ok 4 - this should pass/);
98+
assert.match(stdout, /ok 5 - this should be skipped/);
99+
assert.match(stdout, /ok 6 - this should be executed/);
94100
}
95101

96102
{
@@ -156,9 +162,12 @@ const testFixtures = fixtures.path('test-runner');
156162
assert.match(stdout, /not ok 4 - level 0b/);
157163
assert.match(stdout, / {2}error: 'level 0b error'/);
158164
assert.match(stdout, /# tests 8/);
165+
assert.match(stdout, /# suites 0/);
159166
assert.match(stdout, /# pass 4/);
160167
assert.match(stdout, /# fail 3/);
168+
assert.match(stdout, /# cancelled 0/);
161169
assert.match(stdout, /# skipped 1/);
170+
assert.match(stdout, /# todo 0/);
162171
}
163172

164173
{

0 commit comments

Comments
 (0)
Please sign in to comment.