From: Tim Wood Date: Wed, 20 Feb 2013 17:35:06 +0000 (-0800) Subject: manually duplicating #629 X-Git-Tag: 2.1.0~60^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c09f334ec541c26012423b3bb9973fc724c17f1f;p=thirdparty%2Fmoment.git manually duplicating #629 --- diff --git a/test/moment/diff.js b/test/moment/diff.js index 53049d46d..81edaad49 100644 --- a/test/moment/diff.js +++ b/test/moment/diff.js @@ -13,9 +13,9 @@ exports.diff = { test.equal(moment(0).diff(1000), -1000, "0 - 1 second = -1000"); test.equal(moment(new Date(1000)).diff(1000), 0, "1 second - 1 second = 0"); var oneHourDate = new Date(), - nowDate = new Date(oneHourDate); + nowDate = new Date(+oneHourDate); oneHourDate.setHours(oneHourDate.getHours() + 1); - test.equal(moment(oneHourDate).diff(nowDate), 60 * 60 * 1000, "1 hour from now = 360000"); + test.equal(moment(oneHourDate).diff(nowDate), 60 * 60 * 1000, "1 hour from now = 3600000"); test.done(); },