Teardown now cleans up onAny event (Fixes #43)

This commit is contained in:
Brian Ng 2013-04-15 23:13:17 -05:00
parent 5df50a8afb
commit 9819bbe611

View File

@ -103,11 +103,8 @@ module.exports = function(grunt) {
if (!options.keepRunner && fs.statSync(options.outfile).isFile()) fs.unlink(options.outfile);
if (!options.keepRunner) jasmine.cleanTemp();
// Have to explicitly unregister nested wildcards. Need to file a bug for EventEmitter2
phantomjs.removeAllListeners('*');
phantomjs.removeAllListeners('jasmine.*');
phantomjs.removeAllListeners('error.*');
phantomjs.removeAllListeners('jasmine.done.*');
phantomjs.removeAllListeners();
phantomjs.listenersAny().length = 0;
}
function setup(options) {