You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ka...@apache.org on 2014/07/04 17:56:38 UTC
git commit: Call process.removeAllListeners() in cli spec
Repository: cordova-cli
Updated Branches:
refs/heads/master d86f72026 -> f6ea1a975
Call process.removeAllListeners() in cli spec
Each call to cli in the spec installs a new listener for the uncaughtException
event. After 10 of them this results in a warning from Node.js:
(node) warning: possible EventEmitter memory leak detected. 11 listeners
added. Use emitter.setMaxListeners() to increase limit.
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/f6ea1a97
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/f6ea1a97
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/f6ea1a97
Branch: refs/heads/master
Commit: f6ea1a975aff7a7d3cb92f03fb8da9500e71227e
Parents: d86f720
Author: Mark Koudritsky <ka...@gmail.com>
Authored: Fri Jul 4 11:53:58 2014 -0400
Committer: Mark Koudritsky <ka...@gmail.com>
Committed: Fri Jul 4 11:53:58 2014 -0400
----------------------------------------------------------------------
spec/cli.spec.js | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/f6ea1a97/spec/cli.spec.js
----------------------------------------------------------------------
diff --git a/spec/cli.spec.js b/spec/cli.spec.js
index b08373c..6413b9e 100644
--- a/spec/cli.spec.js
+++ b/spec/cli.spec.js
@@ -30,6 +30,9 @@ describe("cordova cli", function () {
// logging events registered as a result of the "--verbose" flag in
// CLI testing below would cause lots of logging messages printed out by other specs.
spyOn(events, "on");
+ // Each call to cli() registers another listener for uncaughtException.
+ // This results in a warning when too many of them are registered.
+ process.removeAllListeners();
});
describe("options", function () {