You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which environment are you using? (e.g., browser, Node): both browser & Node
How are you running QUnit? (e.g., QUnit CLI, Grunt, Karma, manually in browser): Ember tests & CLI
What are you trying to do?
Execute a test run that filters out some child modules that have hooks.
Code that reproduces the problem:
import{module,test}from'qunit';classFoo{}module('parent',function(hooks){letfoo1;hooks.beforeEach(function(){foo1=newFoo();});test('foo1 is ok',function(assert){assert.ok(foo1);});module('child',function(hooks){letfoo2;hooks.beforeEach(function(){foo2=newFoo();});test('foo2 is ok',function(assert){assert.ok(foo2);});});});
Run with filter=!child so the child module is not executed.
What did you expect to happen?
foo1 and foo2 are garbage collected after the test run because of the code that deletes module hooks out of the global config.
What actually happened?
They are not because the child module's tests never execute, so the child module never "completes" and its hooks are never deleted out of the global config.
The text was updated successfully, but these errors were encountered:
Make sure that even if a module is entirely skipped, its hooks are deleted out of the global config so that they don't cause data they reference to leak.
Fixesqunitjs#1649
If a module is skipped, the hooks of chid modules should be deleted
as well from our global config so that references to memory held
by these closures may be released.
Fixes#1649.
Tell us about your runtime:
What are you trying to do?
Execute a test run that filters out some child modules that have hooks.
Code that reproduces the problem:
Run with
filter=!child
so the child module is not executed.What did you expect to happen?
foo1
andfoo2
are garbage collected after the test run because of the code that deletes module hooks out of the global config.What actually happened?
They are not because the child module's tests never execute, so the child module never "completes" and its hooks are never deleted out of the global config.
The text was updated successfully, but these errors were encountered: