Commit 7e798a1
committed
fix: handle AfterLastTestMethodErrored in StateGenerator to prevent TypeError in parallel mode
When running tests in parallel mode (--parallel), testErroredEvents() can
return AfterLastTestMethodErrored events. The existing code assumed all
non-Errored events were BeforeFirstTestMethodErrored, causing a TypeError
when an AfterLastTestMethodErrored event was passed to
fromBeforeFirstTestMethodErrored().
The fix adds an explicit instanceof check for
BeforeFirstTestMethodErrored instead of the catch-all else, allowing
AfterLastTestMethodErrored events to be safely skipped.
Fixes #16231 parent 24d2bf9 commit 7e798a1
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | | - | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
0 commit comments