Commit cade2fc
test_runner: run t.after() if test body throws
This commit fixes a bug where t.after() was not called if the
test body threw an exception.
PR-URL: #45870
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>1 parent 22c1e91 commit cade2fcCopy full SHA for cade2fc
File tree
Expand file treeCollapse file tree
3 files changed
+35
-4
lines changedOpen diff view settings
Filter options
- lib/internal/test_runner
- test/message
Expand file treeCollapse file tree
3 files changed
+35
-4
lines changedOpen diff view settings
Collapse file
lib/internal/test_runner/test.js
Copy file name to clipboardExpand all lines: lib/internal/test_runner/test.js+7-1Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
508 | 508 | |
509 | 509 | |
510 | 510 | |
| 511 | + |
| 512 | + |
| 513 | + |
| 514 | + |
| 515 | + |
511 | 516 | |
512 | 517 | |
513 | 518 | |
| ||
549 | 554 | |
550 | 555 | |
551 | 556 | |
552 | | - |
| 557 | + |
553 | 558 | |
554 | 559 | |
555 | 560 | |
| 561 | + |
556 | 562 | |
557 | 563 | |
558 | 564 | |
|
Collapse file
test/message/test_runner_hooks.js
Copy file name to clipboardExpand all lines: test/message/test_runner_hooks.js+7Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
142 | 142 | |
143 | 143 | |
144 | 144 | |
| 145 | + |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
Collapse file
test/message/test_runner_hooks.out
Copy file name to clipboardExpand all lines: test/message/test_runner_hooks.out+21-3Lines changed: 21 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
475 | 475 | |
476 | 476 | |
477 | 477 | |
478 | | - |
479 | | - |
| 478 | + |
| 479 | + |
| 480 | + |
| 481 | + |
| 482 | + |
| 483 | + |
| 484 | + |
| 485 | + |
| 486 | + |
| 487 | + |
| 488 | + |
| 489 | + |
| 490 | + |
| 491 | + |
| 492 | + |
| 493 | + |
| 494 | + |
| 495 | + |
| 496 | + |
| 497 | + |
480 | 498 | |
481 | | - |
| 499 | + |
482 | 500 | |
483 | 501 | |
484 | 502 | |
|
0 commit comments