Skip to content

Commit 62a2291

Browse files
0x-r4bbitiurimatias
authored andcommitted
fix(utils/testing): ensure runActionsForEvent() works without params object
1 parent ef1ec3a commit 62a2291

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/utils/testing/src/plugin.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ class Plugins {
2020
}
2121

2222
runActionsForEvent(name, options, callback) {
23+
if (typeof options === 'function') {
24+
callback = options;
25+
options = {};
26+
}
27+
2328
const listeners = this.plugin.getListeners(name);
2429
if (listeners) {
2530
listeners.forEach(fn => fn.spy(options, callback));

0 commit comments

Comments
 (0)