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 {
76
76
color = gray ;
77
77
symbol = symbols [ 'hyphen:minus' ] ;
78
78
}
79
- return `${ prefix } ${ indent } ${ color } ${ symbol } ${ title } ${ error } ${ white } ` ;
79
+ return `${ prefix } ${ indent } ${ color } ${ symbol } ${ title } ${ white } ${ error } ` ;
80
80
}
81
81
#handleTestReportEvent( type , data ) {
82
82
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');
9
9
test ( 'should pass' , ( ) => { } ) ;
10
10
test ( 'should fail' , ( ) => { throw new Error ( 'fail' ) ; } ) ;
11
11
test ( '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 1
1
[32m* should pass [90m(*ms)[39m[39m
2
- [31m* should fail [90m(*ms)[39m
2
+ [31m* should fail [90m(*ms)[39m[39m
3
3
Error: fail
4
4
at * [90m(*)[39m
5
5
[90m at *[39m
8
8
[90m at *[39m
9
9
[90m at *[39m
10
10
[90m at *[39m
11
- **
11
+
12
12
[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
14
28
[34m* pass 1[39m
15
- [34m* fail 1 [39m
29
+ [34m* fail 2 [39m
16
30
[34m* cancelled 0[39m
17
31
[34m* skipped 1[39m
18
32
[34m* todo 0[39m
19
33
[34m* duration_ms *[39m
20
34
21
35
[31m* failing tests:[39m
22
36
23
- [31m* should fail [90m(*ms)[39m
37
+ [31m* should fail [90m(*ms)[39m[39m
24
38
Error: fail
25
39
at * [90m(*)[39m
26
40
[90m at *[39m
29
43
[90m at *[39m
30
44
[90m at *[39m
31
45
[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