]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Add test to ensure invalid moments isSame returns false
authorJoshua Ohlman <codewriterohs@gmail.com>
Sat, 4 Jul 2015 13:08:46 +0000 (08:08 -0500)
committerIskren Chernev <iskren.chernev@gmail.com>
Mon, 13 Jul 2015 00:32:58 +0000 (17:32 -0700)
src/test/moment/is_same.js

index 31794ce78495dd0cea8adfab0d6e6ec03c5aeec4..150194ee2dc1a3e0a2ff2f55766d98f45bfa685a 100644 (file)
@@ -145,3 +145,7 @@ test('is same with utc offset moments', function (assert) {
     assert.ok(moment.parseZone('2013-02-01T-05:00').isSame(moment.parseZone('2013-02-01T-06:30'), 'year'),
             'zoned vs (differently) zoned moment');
 });
+
+test('is same with invalid moments', function (assert) {
+    assert.equal(moment.invalid().isSame(moment.invalid()), false, 'invalid moments are not considered equal');
+});