]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Adding moment.fn.zone unit tests
authorTim Wood <washwithcare@gmail.com>
Thu, 1 Dec 2011 19:18:16 +0000 (11:18 -0800)
committerTim Wood <washwithcare@gmail.com>
Thu, 1 Dec 2011 19:18:16 +0000 (11:18 -0800)
#83

sitesrc/js/unit-tests.js

index f1a4244bbf64f698255cc9c147469d23b844adeb..646e83664a112b452aa4b5597af77e23928a7ee9 100755 (executable)
@@ -357,5 +357,10 @@ test("isDST", 2, function() {
     ok(b.isDST(), '2011 March 14 is DST');
 });
 
+test("zone", 2, function() {
+    ok(moment().zone() % 30 === 0, 'moment.fn.zone should be a multiple of 30 (was ' + moment().zone() + ')');
+    equal(moment().zone(), new Date().getTimezoneOffset(), 'zone should equal getTimezoneOffset');
+});
+
 })();