File tree Expand file tree Collapse file tree 6 files changed +2
-30
lines changed
lib/internal/test_runner/reporter
test/fixtures/test-runner/output Expand file tree Collapse file tree 6 files changed +2
-30
lines changed Original file line number Diff line number Diff line change @@ -83,8 +83,8 @@ class SpecReporter extends Transform {
8383 const error = this . #formatError( data . details ?. error , indent ) ;
8484 if ( hasChildren ) {
8585 // If this test has had children - it was already reported, so slightly modify the output
86- const err = data . details ?. error ?. failureType === 'subtestsFailed' ? '' : error ;
87- return `${ prefix } ${ indent } ${ color } ${ symbols [ 'arrow:right' ] } ${ colors . white } ${ title } \n ${ err } ` ;
86+ const err = ! error || data . details ?. error ?. failureType === 'subtestsFailed' ? '' : `\n ${ error } ` ;
87+ return `${ prefix } ${ indent } ${ color } ${ symbols [ 'arrow:right' ] } ${ colors . white } ${ title } ${ err } ` ;
8888 }
8989 if ( skip !== undefined ) {
9090 color = colors . gray ;
Original file line number Diff line number Diff line change 2828 [32m'test did not finish before its parent and was cancelled'[39m
2929
3030[31m▶ [39mparent [90m(*ms)[39m
31-
3231[34mℹ tests 6[39m
3332[34mℹ suites 0[39m
3433[34mℹ pass 1[39m
Original file line number Diff line number Diff line change 66 nested 1 (*ms)
77 nested 2 (*ms)
88 nested (*ms)
9-
109 describe hooks (*ms)
11-
1210 describe hooks - no subtests (*ms)
1311 before throws
1412 1
9694 *
9795
9896 beforeEach throws (*ms)
99-
10097 afterEach throws
10198 1 (*ms)
10299 Error: afterEach
124121 *
125122
126123 afterEach throws (*ms)
127-
128124 afterEach when test fails
129125 1 (*ms)
130126 Error: test
141137
142138 2 (*ms)
143139 afterEach when test fails (*ms)
144-
145140 afterEach throws and test fails
146141 1 (*ms)
147142 Error: test
169164 *
170165
171166 afterEach throws and test fails (*ms)
172-
173167 test hooks
174168 1 (*ms)
175169 2 (*ms)
176170 nested
177171 nested 1 (*ms)
178172 nested 2 (*ms)
179173 nested (*ms)
180-
181174 test hooks (*ms)
182-
183175 test hooks - no subtests (*ms)
184176 t.before throws
185177 1 (*ms)
293285 *
294286
295287 t.beforeEach throws (*ms)
296-
297288 t.afterEach throws
298289 1 (*ms)
299290 Error: afterEach
322313 *
323314
324315 t.afterEach throws (*ms)
325-
326316 afterEach when test fails
327317 1 (*ms)
328318 Error: test
338328
339329 2 (*ms)
340330 afterEach when test fails (*ms)
341-
342331 afterEach context when test passes
343332 1 (*ms)
344333 afterEach context when test passes (*ms)
345-
346334 afterEach context when test fails
347335 1 (*ms)
348336 Error: test
352340 *
353341
354342 afterEach context when test fails (*ms)
355-
356343 afterEach throws and test fails
357344 1 (*ms)
358345 Error: test
380367 *
381368
382369 afterEach throws and test fails (*ms)
383-
384370 t.after() is called if test body throws (*ms)
385371 Error: bye
386372 *
Original file line number Diff line number Diff line change 107107
108108 this subtest should make its parent test fail
109109 subtest sync throw fail (*ms)
110-
111110 sync throw non-error fail (*ms)
112111 Symbol(thrown symbol from sync throw non-error fail)
113112
117116 level 1c (*ms)
118117 level 1d (*ms)
119118 level 0a (*ms)
120-
121119 top level
122120 +long running (*ms)
123121 'test did not finish before its parent and was cancelled'
124122
125123 +short running
126124 ++short running (*ms)
127125 +short running (*ms)
128-
129126 top level (*ms)
130-
131127 invalid subtest - pass but subtest fails (*ms)
132128 sync skip option (*ms) # SKIP
133129 sync skip option with message (*ms) # this is skipped
197193 'only' and 'runOnly' require the --test-only command-line option.
198194 running subtest 4 (*ms)
199195 only is set but not in only mode (*ms)
200-
201196 'only' and 'runOnly' require the --test-only command-line option.
202197 custom inspect symbol fail (*ms)
203198 customized
231226 *
232227
233228 subtest sync throw fails (*ms)
234-
235229 timed out async test (*ms)
236230 'test timed out after *ms'
237231
Original file line number Diff line number Diff line change 107107
108108 this subtest should make its parent test fail
109109 subtest sync throw fail (*ms)
110-
111110 sync throw non-error fail (*ms)
112111 Symbol(thrown symbol from sync throw non-error fail)
113112
117116 level 1c (*ms)
118117 level 1d (*ms)
119118 level 0a (*ms)
120-
121119 top level
122120 +long running (*ms)
123121 'test did not finish before its parent and was cancelled'
124122
125123 +short running
126124 ++short running (*ms)
127125 +short running (*ms)
128-
129126 top level (*ms)
130-
131127 invalid subtest - pass but subtest fails (*ms)
132128 sync skip option (*ms) # SKIP
133129 sync skip option with message (*ms) # this is skipped
197193 'only' and 'runOnly' require the --test-only command-line option.
198194 running subtest 4 (*ms)
199195 only is set but not in only mode (*ms)
200-
201196 'only' and 'runOnly' require the --test-only command-line option.
202197 custom inspect symbol fail (*ms)
203198 customized
231226 *
232227
233228 subtest sync throw fails (*ms)
234-
235229 timed out async test (*ms)
236230 'test timed out after *ms'
237231
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ AFTER 2
1313 ﹣ should not run (*ms) # SKIP
1414 ✔ should run 2 (*ms)
1515▶ suite runs with mixture of skipped tests (*ms)
16-
1716ℹ tests 4
1817ℹ suites 2
1918ℹ pass 2
You can’t perform that action at this time.
0 commit comments