]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
changed tests to test greater than 24 hour timestamps
authorIan Remmel <design@ianwremmel.com>
Mon, 9 Sep 2013 07:48:31 +0000 (21:48 -1000)
committerIan Remmel <design@ianwremmel.com>
Mon, 9 Sep 2013 07:48:31 +0000 (21:48 -1000)
test/moment/duration.js

index c3ead0656b9c7bd4ea4ed37f3fe5ea8bc1a87eb9..3b24ea0f1b4d59f26838cdca18c5291551b5ceab 100644 (file)
@@ -152,12 +152,12 @@ exports.duration = {
 
      "instantiation from 24-hour time" : function(test) {
         test.expect(6);
-        test.equal(moment.duration("13:45").years(), 0, "0 years");
-        test.equal(moment.duration("13:45").days(), 0, "0 days");
-        test.equal(moment.duration("13:45").hours(), 13, "13 hours");
-        test.equal(moment.duration("13:45").minutes(), 45, "45 minutes");
-        test.equal(moment.duration("13:45").seconds(), 0, "0 seconds");
-        test.equal(moment.duration("13:45").milliseconds(), 0, "0 milliseconds");
+        test.equal(moment.duration("26:45").years(), 0, "0 years");
+        test.equal(moment.duration("26:45").days(), 1, "0 days");
+        test.equal(moment.duration("26:45").hours(), 2, "2 hours");
+        test.equal(moment.duration("26:45").minutes(), 45, "45 minutes");
+        test.equal(moment.duration("26:45").seconds(), 0, "0 seconds");
+        test.equal(moment.duration("26:45").milliseconds(), 0, "0 milliseconds");
         test.done();
     },