Revert "DEV: Import MessageBus from message-bus-client instead of globals (#9902)"

This reverts commit d3bd482142.
This commit is contained in:
Robin Ward
2020-05-27 16:34:30 -04:00
parent d3bd482142
commit 0f71d38d3a
9 changed files with 12 additions and 21 deletions

View File

@@ -1,6 +1,4 @@
import { acceptance } from "helpers/qunit-helpers";
import MessageBus from "message-bus-client";
acceptance("Topic Discovery", {
settings: {
show_pinned_excerpt_desktop: true
@@ -87,7 +85,7 @@ QUnit.test("Live update unread state", async assert => {
);
// Mimic a messagebus message
MessageBus.callbacks.filterBy("channel", "/latest").map(c =>
window.MessageBus.callbacks.filterBy("channel", "/latest").map(c =>
c.func({
message_type: "read",
topic_id: 11995,

View File

@@ -17,7 +17,7 @@
// Stuff we need to load first
//= require vendor
//= require discourse-shims
//= require ember-shim
//= require pretty-text-bundle
//= require markdown-it-bundle
//= require application
@@ -55,10 +55,8 @@ sinon.config = {
window.inTestEnv = true;
let MessageBus = require("message-bus-client").default;
// Stop the message bus so we don't get ajax calls
MessageBus.stop();
window.MessageBus.stop();
// Trick JSHint into allow document.write
var d = document;
@@ -193,7 +191,7 @@ QUnit.testDone(function() {
window.Discourse.__container__
);
MessageBus.unsubscribe("*");
window.MessageBus.unsubscribe("*");
delete window.server;
window.Mousetrap.reset();
});