diff --git a/ember_debug/main.js b/ember_debug/main.js index 244638a025..966b0f37e2 100644 --- a/ember_debug/main.js +++ b/ember_debug/main.js @@ -40,10 +40,7 @@ class EmberDebug extends BaseObject { * @type {String} */ get applicationId() { - if (!this.isTesting) { - return guidFor(this._application, 'ember'); - } - return guidFor(this.owner, 'ember'); + return guidFor(this._application, 'ember'); } // Using object shorthand syntax here is somehow having strange side effects. @@ -56,7 +53,7 @@ class EmberDebug extends BaseObject { this.reset($keepAdapter); return; } - if (!this._application && !this.isTesting) { + if (!this._application) { this._application = getApplication(); } this.started = true; @@ -104,9 +101,7 @@ class EmberDebug extends BaseObject { reset($keepAdapter) { setGuidPrefix(Math.random().toString()); - if (!this.isTesting && !this.owner) { - this.owner = getOwner(this._application); - } + this.owner = this._application && getOwner(this._application); this.destroyContainer(); run(() => { // Adapters don't have state depending on the application itself. diff --git a/tests/helpers/setup-ember-debug-test.js b/tests/helpers/setup-ember-debug-test.js index 090bf213d4..41146aba68 100644 --- a/tests/helpers/setup-ember-debug-test.js +++ b/tests/helpers/setup-ember-debug-test.js @@ -50,11 +50,6 @@ export default function setupEmberDebugTest(hooks, options = {}) { this.owner.register('router:main', Router); this.owner.register('service:adapter', BasicAdapter); - run(() => { - EmberDebug.isTesting = true; - EmberDebug.owner = this.owner; - }); - EmberDebug.Port = options.Port || class extends Port { @@ -73,10 +68,6 @@ export default function setupEmberDebugTest(hooks, options = {}) { EmberDebug.IGNORE_DEPRECATIONS = originalIgnoreDeprecations; - run(() => { - EmberDebug.isTesting = false; - }); - EmberDebug.Port = originalPort; setApplication(originalApp);