]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
failing test for diffing weeks across DST
authorRocky Meza <rocky@fusionbox.com>
Tue, 31 Jan 2012 22:50:05 +0000 (15:50 -0700)
committerRocky Meza <rocky@fusionbox.com>
Tue, 31 Jan 2012 22:50:05 +0000 (15:50 -0700)
site/js/test.min.js
sitesrc/js/unit-tests.js

index cf289f86930e6638c3f16c334d2ff8235da6b65e..8ba115274e04a2e9b9392d533cd2b5f585e83017 100644 (file)
@@ -1710,6 +1710,10 @@ test("diff month", 1, function() {
     equal(moment([2011, 0, 31]).diff([2011, 2, 1], 'months'), -1, "month diff");
 });
 
+test("diff week", 1, function() {
+    equal(moment([2012, 2, 18]).diff([2012], 'weeks'), 12, "week diff");
+});
+
 test("diff overflow", 4, function() {
     equal(moment([2011]).diff([2010], 'months'), 12, "month diff");
     equal(moment([2010, 0, 2]).diff([2010], 'hours'), 24, "hour diff");
index 1765356eb478d99b1cd6f9af53114da20f1f757b..ae2f5c66089e61a06d3f304d0e42fac9abe49fd8 100755 (executable)
@@ -294,6 +294,10 @@ test("diff month", 1, function() {
     equal(moment([2011, 0, 31]).diff([2011, 2, 1], 'months'), -1, "month diff");
 });
 
+test("diff week", 1, function() {
+    equal(moment([2012, 2, 18]).diff([2012], 'weeks'), 12, "week diff");
+});
+
 test("diff overflow", 4, function() {
     equal(moment([2011]).diff([2010], 'months'), 12, "month diff");
     equal(moment([2010, 0, 2]).diff([2010], 'hours'), 24, "hour diff");