From 9819bbe6117f12a6c806d6689c5af5e6da7bd28f Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Mon, 15 Apr 2013 23:13:17 -0500 Subject: [PATCH] Teardown now cleans up onAny event (Fixes #43) --- tasks/jasmine.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tasks/jasmine.js b/tasks/jasmine.js index 9cd2643..ad162ed 100644 --- a/tasks/jasmine.js +++ b/tasks/jasmine.js @@ -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) {