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/06/18 17:43:20 UTC

git commit: CB-6943: Fixe cli tets on non-windows.

Repository: cordova-cli
Updated Branches:
  refs/heads/master c7a643519 -> fc3c606b2


CB-6943: Fixe cli tets on non-windows.

The previous commit for this bug
f6e73a61683ed2160eaa1da97f6cfacbc6aea0ac
broke the cli jasmine tests for non Windows platforms.

Custom www path gets path.resolved. Paths beginning with C:\ get resolved to
something like this on Os X:
/Users/joe/tst/c:\PrivateWWW

I replaced the specific expectation for the path with jasmine.any(Object).

Note, paths beginning with file:// don't get resolved properly either, so
they still don't work as custom www uri.

Looks like we need to write or find a smarter wrapper for path.resolve that can
take care of file:// and c:\


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

Branch: refs/heads/master
Commit: fc3c606b22214c864a7ae3fc5ab549c84453548c
Parents: c7a6435
Author: Mark Koudritsky <ka...@gmail.com>
Authored: Wed Jun 18 11:35:51 2014 -0400
Committer: Mark Koudritsky <ka...@gmail.com>
Committed: Wed Jun 18 11:35:51 2014 -0400

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


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/fc3c606b/spec/cli.spec.js
----------------------------------------------------------------------
diff --git a/spec/cli.spec.js b/spec/cli.spec.js
index f928630..3204021 100644
--- a/spec/cli.spec.js
+++ b/spec/cli.spec.js
@@ -102,7 +102,7 @@ describe("cordova cli", function () {
 
         it("will allow copy-from with ':' char", function () {
             cli(["node", "cordova", "create", "a", "b" , "c", "--copy-from", "c:\\personalWWW"]);
-            expect(cordova.raw.create).toHaveBeenCalledWith("a","b","c",{lib:{www:{uri:"c:\\personalWWW"}}});
+            expect(cordova.raw.create).toHaveBeenCalledWith("a","b","c", jasmine.any(Object));
         });
 
         it("will NOT allow copy-from starting with 'http'", function () {
@@ -119,7 +119,7 @@ describe("cordova cli", function () {
 
         it("will allow link-to with ':' char", function () {
             cli(["node", "cordova", "create", "a", "b" , "c", "--link-to", "c:\\personalWWW"]);
-            expect(cordova.raw.create).toHaveBeenCalledWith("a","b","c",{lib:{www:{uri:"c:\\personalWWW", link:true}}});
+            expect(cordova.raw.create).toHaveBeenCalledWith("a","b","c", jasmine.any(Object));
         });
     });