File tree Expand file tree Collapse file tree 3 files changed +38
-7
lines changed
lib/internal/test_runner/reporter Expand file tree Collapse file tree 3 files changed +38
-7
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ class SpecReporter extends Transform {
7676 color = gray ;
7777 symbol = symbols [ 'hyphen:minus' ] ;
7878 }
79- return `${ prefix } ${ indent } ${ color } ${ symbol } ${ title } ${ error } ${ white } ` ;
79+ return `${ prefix } ${ indent } ${ color } ${ symbol } ${ title } ${ white } ${ error } ` ;
8080 }
8181 #handleTestReportEvent( type , data ) {
8282 const subtest = ArrayPrototypeShift ( this . #stack) ; // This is the matching `test:start` event
Original file line number Diff line number Diff line change @@ -9,3 +9,7 @@ const test = require('node:test');
99test ( 'should pass' , ( ) => { } ) ;
1010test ( 'should fail' , ( ) => { throw new Error ( 'fail' ) ; } ) ;
1111test ( 'should skip' , { skip : true } , ( ) => { } ) ;
12+ test ( 'parent' , ( ) => {
13+ test ( 'should fail' , ( ) => { throw new Error ( 'fail' ) ; } ) ;
14+ test ( 'should pass but parent fail' , ( ) => { } ) ;
15+ } ) ;
Original file line number Diff line number Diff line change 11[32m* should pass [90m(*ms)[39m[39m
2- [31m* should fail [90m(*ms)[39m
2+ [31m* should fail [90m(*ms)[39m[39m
33 Error: fail
44 at * [90m(*)[39m
55 [90m at *[39m
88 [90m at *[39m
99 [90m at *[39m
1010 [90m at *[39m
11- **
11+
1212[90m* should skip [90m(*ms)[39m # SKIP[39m
13- [34m* tests 3[39m
13+ * parent
14+ [31m* should fail [90m(*ms)[39m[39m
15+ Error: fail
16+ at * [90m(*)[39m
17+ [90m at *[39m
18+ [90m at *[39m
19+ [90m at *[39m
20+ [90m at *[39m
21+
22+ [31m✖ should pass but parent fail [90m(*ms)[39m[39m
23+ [32m'test did not finish before its parent and was cancelled'[39m
24+
25+ [31m* [39mparent [90m(*ms)[39m
26+
27+ [34m* tests 4[39m
1428[34m* pass 1[39m
15- [34m* fail 1 [39m
29+ [34m* fail 2 [39m
1630[34m* cancelled 0[39m
1731[34m* skipped 1[39m
1832[34m* todo 0[39m
1933[34m* duration_ms *[39m
2034
2135[31m* failing tests:[39m
2236
23- [31m* should fail [90m(*ms)[39m
37+ [31m* should fail [90m(*ms)[39m[39m
2438 Error: fail
2539 at * [90m(*)[39m
2640 [90m at *[39m
2943 [90m at *[39m
3044 [90m at *[39m
3145 [90m at *[39m
32- [39m
46+
47+ [31m* should fail [90m(*ms)[39m[39m
48+ Error: fail
49+ at * [90m(*)[39m
50+ [90m at *[39m
51+ [90m at *[39m
52+ [90m at *[39m
53+ [90m at *[39m
54+
55+ [31m✖ should pass but parent fail [90m(*ms)[39m[39m
56+ [32m'test did not finish before its parent and was cancelled'[39m
57+
58+ [31m* parent [90m(*ms)[39m[39m
59+ [32m'2 subtests failed'[39m
You can’t perform that action at this time.
0 commit comments