Skip to content

A platform for community discussion. Free, open, simple.

DEV: attempts to remove message bus callbacks between tests (#7715)

Joffrey JAFFEUX6d02dd6d8c71
diff --git a/test/javascripts/test_helper.js b/test/javascripts/test_helper.js
index 0e1abc2d7eb..6e3b7675635 100644
--- a/test/javascripts/test_helper.js
+++ b/test/javascripts/test_helper.js
@@ -166,6 +166,11 @@ QUnit.testDone(function() {
appEvents.off(eventKey, listener.target, listener.fn);
});
});
+
+ // attempts to remove any subscribed message bug callback
+ window.MessageBus.callbacks.forEach(function(callback) {
+ window.MessageBus.unsubscribe(callback.channel, callback.func);
+ });
});
// Load ES6 tests