@@ -189,6 +189,86 @@ not ok 5 - afterEach throws
189
189
error: '2 subtests failed'
190
190
code: 'ERR_TEST_FAILURE'
191
191
...
192
+ # Subtest: afterEach when test fails
193
+ # Subtest: 1
194
+ not ok 1 - 1
195
+ ---
196
+ duration_ms: *
197
+ failureType: 'testCodeFailure'
198
+ error: 'test'
199
+ code: 'ERR_TEST_FAILURE'
200
+ stack: |-
201
+ *
202
+ *
203
+ *
204
+ *
205
+ *
206
+ *
207
+ *
208
+ *
209
+ *
210
+ *
211
+ ...
212
+ # Subtest: 2
213
+ ok 2 - 2
214
+ ---
215
+ duration_ms: *
216
+ ...
217
+ 1..2
218
+ not ok 6 - afterEach when test fails
219
+ ---
220
+ duration_ms: *
221
+ failureType: 'subtestsFailed'
222
+ error: '1 subtest failed'
223
+ code: 'ERR_TEST_FAILURE'
224
+ ...
225
+ # Subtest: afterEach throws and test fails
226
+ # Subtest: 1
227
+ not ok 1 - 1
228
+ ---
229
+ duration_ms: *
230
+ failureType: 'testCodeFailure'
231
+ error: 'test'
232
+ code: 'ERR_TEST_FAILURE'
233
+ stack: |-
234
+ *
235
+ *
236
+ *
237
+ *
238
+ *
239
+ *
240
+ *
241
+ *
242
+ *
243
+ *
244
+ ...
245
+ # Subtest: 2
246
+ not ok 2 - 2
247
+ ---
248
+ duration_ms: *
249
+ failureType: 'hookFailed'
250
+ error: 'failed running afterEach hook'
251
+ code: 'ERR_TEST_FAILURE'
252
+ stack: |-
253
+ *
254
+ *
255
+ *
256
+ *
257
+ *
258
+ *
259
+ *
260
+ *
261
+ *
262
+ *
263
+ ...
264
+ 1..2
265
+ not ok 7 - afterEach throws and test fails
266
+ ---
267
+ duration_ms: *
268
+ failureType: 'subtestsFailed'
269
+ error: '2 subtests failed'
270
+ code: 'ERR_TEST_FAILURE'
271
+ ...
192
272
# Subtest: test hooks
193
273
# Subtest: 1
194
274
ok 1 - 1
@@ -217,7 +297,7 @@ not ok 5 - afterEach throws
217
297
duration_ms: *
218
298
...
219
299
1..3
220
- ok 6 - test hooks
300
+ ok 8 - test hooks
221
301
---
222
302
duration_ms: *
223
303
...
@@ -261,7 +341,7 @@ ok 6 - test hooks
261
341
*
262
342
...
263
343
1..2
264
- not ok 7 - t.beforeEach throws
344
+ not ok 9 - t.beforeEach throws
265
345
---
266
346
duration_ms: *
267
347
failureType: 'subtestsFailed'
@@ -308,17 +388,97 @@ not ok 7 - t.beforeEach throws
308
388
*
309
389
...
310
390
1..2
311
- not ok 8 - t.afterEach throws
391
+ not ok 10 - t.afterEach throws
392
+ ---
393
+ duration_ms: *
394
+ failureType: 'subtestsFailed'
395
+ error: '2 subtests failed'
396
+ code: 'ERR_TEST_FAILURE'
397
+ ...
398
+ # Subtest: afterEach when test fails
399
+ # Subtest: 1
400
+ not ok 1 - 1
401
+ ---
402
+ duration_ms: *
403
+ failureType: 'testCodeFailure'
404
+ error: 'test'
405
+ code: 'ERR_TEST_FAILURE'
406
+ stack: |-
407
+ *
408
+ *
409
+ *
410
+ *
411
+ *
412
+ *
413
+ *
414
+ *
415
+ *
416
+ *
417
+ ...
418
+ # Subtest: 2
419
+ ok 2 - 2
420
+ ---
421
+ duration_ms: *
422
+ ...
423
+ 1..2
424
+ not ok 11 - afterEach when test fails
425
+ ---
426
+ duration_ms: *
427
+ failureType: 'subtestsFailed'
428
+ error: '1 subtest failed'
429
+ code: 'ERR_TEST_FAILURE'
430
+ ...
431
+ # Subtest: afterEach throws and test fails
432
+ # Subtest: 1
433
+ not ok 1 - 1
434
+ ---
435
+ duration_ms: *
436
+ failureType: 'testCodeFailure'
437
+ error: 'test'
438
+ code: 'ERR_TEST_FAILURE'
439
+ stack: |-
440
+ *
441
+ *
442
+ *
443
+ *
444
+ *
445
+ *
446
+ *
447
+ *
448
+ *
449
+ *
450
+ ...
451
+ # Subtest: 2
452
+ not ok 2 - 2
453
+ ---
454
+ duration_ms: *
455
+ failureType: 'hookFailed'
456
+ error: 'failed running afterEach hook'
457
+ code: 'ERR_TEST_FAILURE'
458
+ stack: |-
459
+ *
460
+ *
461
+ *
462
+ *
463
+ *
464
+ *
465
+ *
466
+ *
467
+ *
468
+ *
469
+ ...
470
+ 1..2
471
+ not ok 12 - afterEach throws and test fails
312
472
---
313
473
duration_ms: *
314
474
failureType: 'subtestsFailed'
315
475
error: '2 subtests failed'
316
476
code: 'ERR_TEST_FAILURE'
317
477
...
318
- 1..8
319
- # tests 8
478
+ 1..12
479
+ # tests 12
320
480
# pass 2
321
- # fail 6
481
+ # fail 10
322
482
# cancelled 0
323
483
# skipped 0
324
484
# todo 0
0 commit comments