Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure renderDebug is properly unregistered. #1202

Merged
merged 1 commit into from
May 12, 2020
Merged
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
2 changes: 1 addition & 1 deletion ember_debug/render-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default EmberObject.extend(PortMixin, {
};

this.profileManager.offProfilesAdded(this, this.sendAdded);
this.profileManager.offProfilesAdded(this, this._updateRenderPerformanceAndComponentTree);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method doesn't exist on ember-debug/render-debug at all. It was removed in 4713877#diff-04f0316e4c3ec9f79f8bf1ec48f6aafbL45, but we missed updating the cleanup code with the renamed method.

this.profileManager.offProfilesAdded(this, this._updateComponentTree);
},

sendAdded(profiles) {
Expand Down
4 changes: 1 addition & 3 deletions tests/ember_debug/container-debug-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ import { settled, visit } from '@ember/test-helpers';
import { A as emberA } from '@ember/array';

import { module, test } from 'qunit';
import require from 'require';

import EmberDebug from 'ember-debug/main';
import { destroyEIApp, setupEIApp } from '../helpers/setup-destroy-ei-app';

let EmberDebug;
let port, name, message;
let App;

module('Ember Debug - Container', function(hooks) {
hooks.beforeEach(async function() {
EmberDebug = require('ember-debug/main').default;
EmberDebug.Port = EmberDebug.Port.extend({
init() {},
send(n, m) {
Expand Down
4 changes: 1 addition & 3 deletions tests/ember_debug/deprecation-debug-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ import Route from '@ember/routing/route';
import RSVP from 'rsvp';
import { run } from '@ember/runloop';
import { module, test } from 'qunit';
import require from 'require';
import { setupEIApp, destroyEIApp } from '../helpers/setup-destroy-ei-app';

const EmberDebug = require('ember-debug/main').default;
import EmberDebug from 'ember-debug/main';

let port;
let App;
Expand Down
4 changes: 1 addition & 3 deletions tests/ember_debug/ember-debug-test.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import EmberObject from '@ember/object';
let name;
import { module, test } from 'qunit';
import require from 'require';
import { setupEIApp, destroyEIApp } from '../helpers/setup-destroy-ei-app';
import EmberDebug from 'ember-debug/main';
import { settled } from '@ember/test-helpers';

let EmberDebug;
let port, adapter;
let App;
let EmberInspector;

module("Ember Debug", function(hooks) {
hooks.beforeEach(async function() {
EmberDebug = require('ember-debug/main').default;
EmberDebug.Port = EmberDebug.Port.extend({
init() {},
send(n/*, m*/) {
Expand Down
5 changes: 2 additions & 3 deletions tests/ember_debug/object-inspector-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import { hbs } from 'ember-cli-htmlbars';
import require from 'require';
import { destroyEIApp, setupEIApp } from '../helpers/setup-destroy-ei-app';
import hasEmberVersion from '@ember/test-helpers/has-ember-version';
import EmberDebug from 'ember-debug/main';
import { compareVersion } from 'ember-debug/utils/version';

const GlimmerComponent = (function() {
try {
Expand All @@ -26,7 +28,6 @@ const GlimmerComponent = (function() {
}
})();

let EmberDebug;
let port;
let App;
let objectInspector;
Expand Down Expand Up @@ -80,7 +81,6 @@ async function inspectObject(object) {
module('Ember Debug - Object Inspector', function(hooks) {
// eslint-disable-next-line object-shorthand
hooks.beforeEach(async function() {
EmberDebug = require('ember-debug/main').default;
EmberDebug.Port = EmberDebug.Port.extend({
init() { },
send() { }
Expand Down Expand Up @@ -164,7 +164,6 @@ module('Ember Debug - Object Inspector', function(hooks) {
});

test('An ES6 Class is correctly transformed into an inspection hash', async function(assert) {
const compareVersion = require('ember-debug/utils/version').compareVersion;
if (compareVersion(VERSION, '3.9.0') === -1) {
assert.expect(0);
return;
Expand Down
4 changes: 1 addition & 3 deletions tests/ember_debug/promise-debug-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ import { run, later } from '@ember/runloop';
import { A as emberA } from '@ember/array';
import RSVP from 'rsvp';
import { module, skip, test } from 'qunit';
import require from 'require';
import { setupEIApp, destroyEIApp } from '../helpers/setup-destroy-ei-app';
import { settled } from '@ember/test-helpers';

const EmberDebug = require('ember-debug/main').default;
import EmberDebug from 'ember-debug/main';

let port, name, message;
let App;
Expand Down
3 changes: 1 addition & 2 deletions tests/ember_debug/render-debug-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { settled, visit } from '@ember/test-helpers';
import Ember from 'ember';
import { module, test } from 'qunit';
import { hbs } from 'ember-cli-htmlbars';
import require from 'require';
import { setupEIApp, destroyEIApp } from '../helpers/setup-destroy-ei-app';
import EmberDebug from 'ember-debug/main';

const EmberDebug = require('ember-debug/main').default;
let port, App;

module('Ember Debug - Render Debug', function(hooks) {
Expand Down
3 changes: 1 addition & 2 deletions tests/ember_debug/route-debug-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ import { get } from '@ember/object';
import { run } from '@ember/runloop';
import Route from '@ember/routing/route';
import { module, test } from 'qunit';
import require from 'require';
import { destroyEIApp, setupEIApp } from '../helpers/setup-destroy-ei-app';
import EmberDebug from 'ember-debug/main';

const EmberDebug = require('ember-debug/main').default;
let port;
let App;

Expand Down
3 changes: 1 addition & 2 deletions tests/ember_debug/view-debug-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ import EmberObject from '@ember/object';
import Controller from '@ember/controller';
import QUnit, { module, test } from 'qunit';
import { hbs } from 'ember-cli-htmlbars';
import require from 'require';
import { destroyEIApp, setupEIApp } from '../helpers/setup-destroy-ei-app';
import EmberDebug from 'ember-debug/main';

const EmberDebug = require('ember-debug/main').default;
let port;
let App;

Expand Down
1 change: 1 addition & 0 deletions tests/test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import config from 'ember-inspector/config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';
import TestAdapter from './test-adapter';
import 'ember-debug/main';

Application.initializer({
name: `00-override-adapter`,
Expand Down