Skip to content

Commit 42050fc

Browse files
committed
Core: Add memory to the error event to allow late event listeners
Cherry-picked from 15acb36 (3.0.0-dev). > HTML Reporter: Add support for displaying early errors > Ref #1786.
1 parent 01f7780 commit 42050fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/events.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const SUPPORTED_EVENTS = [
1212
'runEnd'
1313
];
1414
const MEMORY_EVENTS = [
15+
'error',
1516
'runEnd'
1617
];
1718

@@ -40,7 +41,7 @@ export function emit (eventName, data) {
4041
callbacks[i](data);
4142
}
4243

43-
if (inArray(MEMORY_EVENTS, eventName)) {
44+
if (inArray(eventName, MEMORY_EVENTS)) {
4445
config._event_memory[eventName] = data;
4546
}
4647
}

0 commit comments

Comments
 (0)