From 1bb70121f85904bacf090cb6c3038cedb1929cfd Mon Sep 17 00:00:00 2001 From: Julian Horn Date: Mon, 20 Apr 2015 11:35:19 -0400 Subject: [PATCH] Fixed a couple of test problems Updated version of jsdom from 0.6.x to 3.1.0. The older jsdom fails with a RangeError, saying "The normalization form should be one of NFC, NFD, NFKC, NFKD." I tested the newer jsdom with node 0.11.15 and 0.12.0. I can't get Ripple to install with node 0.10.5, because some modules require version specifications containing "^", and that form isn't understood by the version of npm that comes with node 0.10.5. Also had to update bower to version 1.3.12 for similar reasons. It wasn't successfully installing jasmine into thirdparty folder. Finally, fixed a unit test that only passed if two calls to Date retrned the same value. The calls are close together so this usually works, but it does cause intermittant failures. --- package.json | 4 ++-- test/unit/client/cordova/globalization.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 23cc9b7e..b689ba23 100644 --- a/package.json +++ b/package.json @@ -36,12 +36,12 @@ "request": "2.12.0" }, "devDependencies": { - "bower": "0.9.x", + "bower": "1.3.12", "connect": "2.3.6", "coverjs": "0.0.14", "cssmin": "0.3.1", "html-minifier": "0.4.5", - "jsdom": "0.6.x", + "jsdom": "3.1.0", "jWorkflow": "0.x.x", "semver": "^4.3.1", "xmlhttprequest": "1.4.2" diff --git a/test/unit/client/cordova/globalization.js b/test/unit/client/cordova/globalization.js index 37890e2b..2d43bcb0 100644 --- a/test/unit/client/cordova/globalization.js +++ b/test/unit/client/cordova/globalization.js @@ -92,7 +92,7 @@ describe("cordova globalization bridge", function () { }); it("calls moment with the provided date", function () { - var date = new Date(); + var date = args[0].date; glob.dateToString(success, fail, args); expect(moment).toHaveBeenCalledWith(date); });