File tree 3 files changed +39
-8
lines changed
lib/internal/test_runner/reporter
3 files changed +39
-8
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 6[39m
14
28
[34m* suites 0[39m
15
29
[34m* pass 1[39m
16
- [34m* fail 1 [39m
17
- [34m* cancelled 0 [39m
30
+ [34m* fail 3 [39m
31
+ [34m* cancelled 1 [39m
18
32
[34m* skipped 1[39m
19
33
[34m* todo 0[39m
20
34
[34m* duration_ms *[39m
21
35
22
36
[31m* failing tests:[39m
23
37
24
- [31m* should fail [90m(*ms)[39m
38
+ [31m* should fail [90m(*ms)[39m[39m
25
39
Error: fail
26
40
at * [90m(*)[39m
27
41
[90m at *[39m
30
44
[90m at *[39m
31
45
[90m at *[39m
32
46
[90m at *[39m
33
- [39m
47
+
48
+ [31m* should fail [90m(*ms)[39m[39m
49
+ Error: fail
50
+ at * [90m(*)[39m
51
+ [90m at *[39m
52
+ [90m at *[39m
53
+ [90m at *[39m
54
+ [90m at *[39m
55
+
56
+ [31m* should pass but parent fail [90m(*ms)[39m[39m
57
+ [32m'test did not finish before its parent and was cancelled'[39m
58
+
59
+ [31m* parent [90m(*ms)[39m[39m
60
+ [32m'2 subtests failed'[39m
You can’t perform that action at this time.
0 commit comments