You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2016/05/10 13:24:56 UTC

cordova-cli git commit: CB-9858 Fix tests failing due to new --fetch option

Repository: cordova-cli
Updated Branches:
  refs/heads/master 5e2149fee -> 18e7377b9


CB-9858 Fix tests failing due to new --fetch option


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

Branch: refs/heads/master
Commit: 18e7377b9ef64c67a80fc8ea754e5bc9d7636be8
Parents: 5e2149f
Author: Vladimir Kotikov <ko...@gmail.com>
Authored: Tue May 10 16:24:39 2016 +0300
Committer: Vladimir Kotikov <ko...@gmail.com>
Committed: Tue May 10 16:24:39 2016 +0300

----------------------------------------------------------------------
 spec/cli.spec.js | 71 ++++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 62 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/18e7377b/spec/cli.spec.js
----------------------------------------------------------------------
diff --git a/spec/cli.spec.js b/spec/cli.spec.js
index ee8adba..03ba33a 100644
--- a/spec/cli.spec.js
+++ b/spec/cli.spec.js
@@ -22,7 +22,7 @@ var cli = require("../src/cli"),
     cordova_lib = require('cordova-lib'),
     events = cordova_lib.events,
     cordova = cordova_lib.cordova;
-    
+
     //avoid node complaining of too many event listener added
     process.setMaxListeners(0);
 
@@ -74,34 +74,87 @@ describe("cordova cli", function () {
 
         it("will call command with all arguments passed through", function () {
             cli(["node", "cordova", "build", "blackberry10", "--", "-k", "abcd1234"]);
-          expect(cordova.raw.build).toHaveBeenCalledWith({ platforms : [ 'blackberry10' ], options : { argv : [ '-k', 'abcd1234' ] }, verbose : false, silent : false, browserify : false, nohooks:[], searchpath : undefined });
+            expect(cordova.raw.build).toHaveBeenCalledWith(jasmine.objectContaining({
+                platforms : [ 'blackberry10' ],
+                options : { argv : [ '-k', 'abcd1234' ] },
+                verbose : false,
+                silent : false,
+                fetch: false,
+                browserify : false,
+                nohooks:[],
+                searchpath : undefined
+            }));
         });
 
         it("will consume the first instance of -d", function () {
             cli(["node", "cordova", "-d", "build", "blackberry10", "--", "-k", "abcd1234", "-d"]);
-            expect(cordova.raw.build).toHaveBeenCalledWith({ platforms : [ 'blackberry10' ], options : { verbose : true, argv : [ '-k', 'abcd1234', '-d' ] }, verbose : true, silent : false, browserify : false, nohooks:[], searchpath : undefined });
+            expect(cordova.raw.build).toHaveBeenCalledWith(jasmine.objectContaining({
+                platforms : [ 'blackberry10' ],
+                options : { verbose : true, argv : [ '-k', 'abcd1234', '-d' ] },
+                verbose : true,
+                silent : false,
+                fetch: false,
+                browserify : false,
+                nohooks:[],
+                searchpath : undefined
+            }));
         });
 
         it("will consume the first instance of --verbose", function () {
             cli(["node", "cordova", "--verbose", "build", "blackberry10", "--", "-k", "abcd1234", "--verbose"]);
-            expect(cordova.raw.build).toHaveBeenCalledWith({ platforms : [ 'blackberry10' ], options : { verbose : true, argv : [ '-k', 'abcd1234', '--verbose' ] }, verbose : true, silent : false, browserify : false, nohooks:[], searchpath : undefined });
+            expect(cordova.raw.build).toHaveBeenCalledWith(jasmine.objectContaining({
+                platforms : [ 'blackberry10' ],
+                options : { verbose : true, argv : [ '-k', 'abcd1234', '--verbose' ] },
+                verbose : true,
+                silent : false,
+                fetch: false,
+                browserify : false,
+                nohooks:[],
+                searchpath : undefined
+            }));
         });
 
         it("will consume the first instance of either --verbose of -d", function () {
             cli(["node", "cordova", "--verbose", "build", "blackberry10", "--", "-k", "abcd1234", "-d"]);
-            expect(cordova.raw.build).toHaveBeenCalledWith({ platforms : [ 'blackberry10' ], options : { verbose : true, argv : [ '-k', 'abcd1234', '-d' ] }, verbose : true, silent : false, browserify : false, nohooks:[], searchpath : undefined });
+            expect(cordova.raw.build).toHaveBeenCalledWith(jasmine.objectContaining({
+                platforms : [ 'blackberry10' ],
+                options : { verbose : true, argv : [ '-k', 'abcd1234', '-d' ] },
+                verbose : true,
+                silent : false,
+                fetch: false,
+                browserify : false,
+                nohooks:[],
+                searchpath : undefined
+            }));
         });
 
         it("will consume the first instance of either --verbose of -d", function () {
             cli(["node", "cordova", "-d", "build", "blackberry10", "--", "-k", "abcd1234", "--verbose"]);
-            expect(cordova.raw.build).toHaveBeenCalledWith({ platforms : [ 'blackberry10' ], options : { verbose : true, argv : [ '-k', 'abcd1234', '--verbose' ] }, verbose : true, silent : false, browserify : false, nohooks:[], searchpath : undefined });
+            expect(cordova.raw.build).toHaveBeenCalledWith(jasmine.objectContaining({
+                platforms : [ 'blackberry10' ],
+                options : { verbose : true, argv : [ '-k', 'abcd1234', '--verbose' ] },
+                verbose : true,
+                silent : false,
+                fetch: false,
+                browserify : false,
+                nohooks:[],
+                searchpath : undefined
+            }));
         });
 
         it("will consume the first instance of --silent", function () {
             cli(["node", "cordova", "--silent", "build", "blackberry10", "--",  "-k", "abcd1234", "--silent"]);
-            expect(cordova.raw.build).toHaveBeenCalledWith({ platforms : [ 'blackberry10' ], options : { silent : true, argv : [ '-k', 'abcd1234', '--silent' ] }, verbose : false, silent : true, browserify : false, nohooks:[], searchpath : undefined });
+            expect(cordova.raw.build).toHaveBeenCalledWith(jasmine.objectContaining({
+                platforms : [ 'blackberry10' ],
+                options : { silent : true, argv : [ '-k', 'abcd1234', '--silent' ] },
+                verbose : false,
+                silent : true,
+                fetch: false,
+                browserify : false,
+                nohooks:[],
+                searchpath : undefined
+            }));
         });
-
     });
 
     describe("create", function () {
@@ -115,7 +168,7 @@ describe("cordova cli", function () {
             expect(cordova.raw.create).toHaveBeenCalledWith("a","b","c", jasmine.any(Object));
         });
     });
-    
+
     describe("plugin", function () {
         beforeEach(function () {
             spyOn(cordova.raw, "plugin").andReturn(Q());


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org