Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Polyfill QUnit memory leak prevention.
This polyfills the changes from qunitjs/qunit#1279 to older versions of QUnit. --- Prior to the changes in this PR, all module and test callbacks are retained (forever). This may not seem significant, but as folks use closure scope to store data across tests (which is very common). For example, prior to the changes in this PR the following would retain the local variable: ```js QUnit.module('top', function(hooks) { let largeThing; hooks.beforeEach(function() { largeThing = new LargeThing(); }); hooks.afterEach(function() { largeThing.destroy(); }); test('something that uses largeThing', function(assert) { // ...snip... largeThing.someMethod(); }); }); ```
- Loading branch information