]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Adding tests for eod on utc mode
authorTim Wood <washwithcare@gmail.com>
Mon, 16 Apr 2012 18:47:17 +0000 (11:47 -0700)
committerTim Wood <washwithcare@gmail.com>
Mon, 16 Apr 2012 18:47:17 +0000 (11:47 -0700)
test/moment/sod_eod.js

index 06929bbfb57c26dd9d3f5cd15381591b7318dfec..d9c14b0b1f62e9e1c38db10da526f34314b8e759 100644 (file)
@@ -26,6 +26,15 @@ exports.eod_sod = {
         test.equal(m.minutes(), 59, "set the minutes"); 
         test.equal(m.seconds(), 59, "set the seconds"); 
         test.equal(m.milliseconds(), 999, "set the seconds");
+        test.done();
+    },
+
+    "eod utc" : function(test) {
+        test.expect(1);
+
+        var m2 = moment.utc(new Date(2011, 1, 2, 3, 4, 5, 6));
+        test.equal(m2.eod(), m2.hours(23).minutes(59).seconds(59).milliseconds(999));
+        
         test.done();
     }
 };