@@ -505,6 +505,41 @@ not ok 12 - afterEach when test fails
505
505
error: '1 subtest failed'
506
506
code: 'ERR_TEST_FAILURE'
507
507
...
508
+ # Subtest: afterEach context when test passes
509
+ # Subtest: 1
510
+ ok 1 - 1
511
+ ---
512
+ duration_ms: *
513
+ ...
514
+ 1..1
515
+ ok 13 - afterEach context when test passes
516
+ ---
517
+ duration_ms: *
518
+ ...
519
+ # Subtest: afterEach context when test fails
520
+ # Subtest: 1
521
+ not ok 1 - 1
522
+ ---
523
+ duration_ms: *
524
+ location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11'
525
+ failureType: 'testCodeFailure'
526
+ error: 'test'
527
+ code: 'ERR_TEST_FAILURE'
528
+ stack: |-
529
+ *
530
+ *
531
+ *
532
+ *
533
+ ...
534
+ 1..1
535
+ not ok 14 - afterEach context when test fails
536
+ ---
537
+ duration_ms: *
538
+ location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1'
539
+ failureType: 'subtestsFailed'
540
+ error: '1 subtest failed'
541
+ code: 'ERR_TEST_FAILURE'
542
+ ...
508
543
# Subtest: afterEach throws and test fails
509
544
# Subtest: 1
510
545
not ok 1 - 1
@@ -546,7 +581,7 @@ not ok 12 - afterEach when test fails
546
581
*
547
582
...
548
583
1..2
549
- not ok 13 - afterEach throws and test fails
584
+ not ok 15 - afterEach throws and test fails
550
585
---
551
586
duration_ms: *
552
587
location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1'
@@ -555,7 +590,7 @@ not ok 13 - afterEach throws and test fails
555
590
code: 'ERR_TEST_FAILURE'
556
591
...
557
592
# Subtest: t.after() is called if test body throws
558
- not ok 14 - t.after() is called if test body throws
593
+ not ok 16 - t.after() is called if test body throws
559
594
---
560
595
duration_ms: *
561
596
location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1'
@@ -580,7 +615,7 @@ not ok 14 - t.after() is called if test body throws
580
615
code: 'ERR_TEST_FAILURE'
581
616
...
582
617
1..1
583
- not ok 15 - run after when before throws
618
+ not ok 17 - run after when before throws
584
619
---
585
620
duration_ms: *
586
621
type: 'suite'
@@ -599,15 +634,15 @@ not ok 15 - run after when before throws
599
634
*
600
635
*
601
636
...
602
- 1..15
637
+ 1..17
603
638
# before 1 called
604
639
# before 2 called
605
640
# after 1 called
606
641
# after 2 called
607
- # tests 39
642
+ # tests 43
608
643
# suites 9
609
- # pass 14
610
- # fail 22
644
+ # pass 16
645
+ # fail 24
611
646
# cancelled 3
612
647
# skipped 0
613
648
# todo 0
0 commit comments