]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
manually duplicating #629
authorTim Wood <washwithcare@gmail.com>
Wed, 20 Feb 2013 17:35:06 +0000 (09:35 -0800)
committerTim Wood <washwithcare@gmail.com>
Wed, 20 Feb 2013 17:35:06 +0000 (09:35 -0800)
test/moment/diff.js

index 53049d46d6a9d7077edebeae66a7f83abff2b475..81edaad49df65968f2375f6f5673a12b18816eb4 100644 (file)
@@ -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();
     },