From d10f95bfadfa8f4676b7c9a29fe4d6b5a1a3028e Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Wed, 16 Mar 2022 17:12:15 +0100 Subject: [PATCH] FIX: Ember test imports, again (#16203) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We use that import also outside of tests… --- app/assets/javascripts/discourse-loader.js | 4 ++++ app/assets/javascripts/test-shims.js | 10 ---------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/discourse-loader.js b/app/assets/javascripts/discourse-loader.js index e55edf45cc7..3686522bdca 100644 --- a/app/assets/javascripts/discourse-loader.js +++ b/app/assets/javascripts/discourse-loader.js @@ -164,6 +164,10 @@ var define, requirejs; "@ember/object/internals": { guidFor: Ember.guidFor, }, + "@ember/test": { + registerWaiter: Ember.Test && Ember.Test.registerWaiter, + unregisterWaiter: Ember.Test && Ember.Test.unregisterWaiter, + }, I18n: { // eslint-disable-next-line default: I18n, diff --git a/app/assets/javascripts/test-shims.js b/app/assets/javascripts/test-shims.js index 37434a3132e..2aaf663525a 100644 --- a/app/assets/javascripts/test-shims.js +++ b/app/assets/javascripts/test-shims.js @@ -26,16 +26,6 @@ define("htmlbars-inline-precompile", () => { }; }); -define("@ember/test", () => { - // eslint-disable-next-line no-undef, discourse-ember/global-ember - const { registerWaiter, unregisterWaiter } = Ember.Test; - - return { - registerWaiter, - unregisterWaiter, - }; -}); - let _app; define("@ember/test-helpers", () => { let helpers = {