From: Joshua Ohlman Date: Sat, 4 Jul 2015 13:08:46 +0000 (-0500) Subject: Add test to ensure invalid moments isSame returns false X-Git-Tag: 2.10.5~23^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79925cebb2752e6faef35bdc51af285a37f48dca;p=thirdparty%2Fmoment.git Add test to ensure invalid moments isSame returns false --- diff --git a/src/test/moment/is_same.js b/src/test/moment/is_same.js index 31794ce78..150194ee2 100644 --- a/src/test/moment/is_same.js +++ b/src/test/moment/is_same.js @@ -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'); +});