Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions ember_debug/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
Expand Down Expand Up @@ -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.
Expand Down
9 changes: 0 additions & 9 deletions tests/helpers/setup-ember-debug-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -73,10 +68,6 @@ export default function setupEmberDebugTest(hooks, options = {}) {

EmberDebug.IGNORE_DEPRECATIONS = originalIgnoreDeprecations;

run(() => {
EmberDebug.isTesting = false;
});

EmberDebug.Port = originalPort;

setApplication(originalApp);
Expand Down