cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lorinb...@apache.org
Subject git commit: [CB-7358] cli spec mocks console log to avoid polluting test output while testing
Date Thu, 21 Aug 2014 18:37:23 GMT
Repository: cordova-cli
Updated Branches:
  refs/heads/master f4df7ae9c -> 131123348


[CB-7358] cli spec mocks console log to avoid polluting test output while testing


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/13112334
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/13112334
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/13112334

Branch: refs/heads/master
Commit: 131123348544ec8cc2ecb8e2b8800c94cd643c75
Parents: f4df7ae
Author: Lorin Beer <lorin.beer@gmail.com>
Authored: Thu Aug 21 11:37:16 2014 -0700
Committer: Lorin Beer <lorin.beer@gmail.com>
Committed: Thu Aug 21 11:37:16 2014 -0700

----------------------------------------------------------------------
 spec/cli.spec.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/13112334/spec/cli.spec.js
----------------------------------------------------------------------
diff --git a/spec/cli.spec.js b/spec/cli.spec.js
index 40e982e..90c34a7 100644
--- a/spec/cli.spec.js
+++ b/spec/cli.spec.js
@@ -33,6 +33,7 @@ describe("cordova cli", function () {
         // Each call to cli() registers another listener for uncaughtException.
         // This results in a warning when too many of them are registered.
         process.removeAllListeners();
+        spyOn(console, 'log');
     });
 
     describe("options", function () {
@@ -40,7 +41,7 @@ describe("cordova cli", function () {
             var version = require("../package").version;
 
             beforeEach(function () {
-                spyOn(console, "log");
+                spyOn(console, "log").andCallFake(function(){});
             });
 
             it("will spit out the version with -v", function () {


Mime
View raw message