Skip to content

Commit

Permalink
Remove polyfillMemoryLeakPrevention
Browse files Browse the repository at this point in the history
As of [email protected], this polyfill is no longer necessary and can cause issues
in apps the implement ember-qunit
  • Loading branch information
tmquinn committed Sep 27, 2018
1 parent 6850ecc commit 1517e8f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
20 changes: 0 additions & 20 deletions addon-test-support/ember-qunit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,21 +243,6 @@ export function setupTestIsolationValidation() {
QUnit.done(reportIfTestNotIsolated);
}

// This polyfills the changes from https://github.com/qunitjs/qunit/pull/1279
// and should be removed when that change is released and included in a release
// version of QUnit
function polyfillMemoryLeakPrevention() {
QUnit.testDone(function() {
// release the test callback
QUnit.config.current.callback = undefined;
});

QUnit.moduleDone(function() {
// release the module hooks
QUnit.config.current.module.hooks = {};
});
}

/**
@method start
@param {Object} [options] Options to be used for enabling/disabling behaviors
Expand All @@ -275,7 +260,6 @@ function polyfillMemoryLeakPrevention() {
of `Ember.onerror` will be disabled.
@param {Boolean} [options.setupTestIsolationValidation] If `false` test isolation validation
will be disabled.
@param {Boolean} [options._polyfillMemoryLeakPrevention] If `false` the polyfilled memory leak prevention will not be enabled.
*/
export function start(options = {}) {
if (options.loadTests !== false) {
Expand Down Expand Up @@ -305,10 +289,6 @@ export function start(options = {}) {
setupTestIsolationValidation();
}

if (options._polyfillMemoryLeakPrevention !== false) {
polyfillMemoryLeakPrevention();
}

if (options.startTests !== false) {
startTests();
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"common-tags": "^1.4.0",
"ember-cli-babel": "^6.8.2",
"ember-cli-test-loader": "^2.2.0",
"qunit": "^2.5.0"
"qunit": "^2.6.0"
},
"devDependencies": {
"ember-cli": "~2.15.1",
Expand Down

0 comments on commit 1517e8f

Please sign in to comment.