Clean up global error listener leaks in Jasmine's own tests
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
// env is stateful. Ensure that it does not leak between tests.
|
// env is stateful. Ensure that it, and its global error event listeners,
|
||||||
jasmineUnderTest.currentEnv_ = null;
|
// do not leak between tests.
|
||||||
|
if (jasmineUnderTest.currentEnv_) {
|
||||||
|
jasmineUnderTest.currentEnv_.cleanup_();
|
||||||
|
jasmineUnderTest.currentEnv_ = null;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user