From 62a229198b628ff559ecc38b6c7e7fd2c0e3f24c Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Mon, 17 Feb 2020 12:20:10 +0100 Subject: [PATCH] fix(utils/testing): ensure runActionsForEvent() works without params object --- packages/utils/testing/src/plugin.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/utils/testing/src/plugin.js b/packages/utils/testing/src/plugin.js index a7bbd0095..36e68cdee 100644 --- a/packages/utils/testing/src/plugin.js +++ b/packages/utils/testing/src/plugin.js @@ -20,6 +20,11 @@ class Plugins { } runActionsForEvent(name, options, callback) { + if (typeof options === 'function') { + callback = options; + options = {}; + } + const listeners = this.plugin.getListeners(name); if (listeners) { listeners.forEach(fn => fn.spy(options, callback));