From: Iskren Chernev Date: Sat, 12 Nov 2016 06:25:27 +0000 (-0800) Subject: Update invalid date check in tests X-Git-Tag: 2.17.0~7^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ba3f90c184ed7cb43469b7ac3bf4fe7d6163f8d;p=thirdparty%2Fmoment.git Update invalid date check in tests --- diff --git a/src/test/moment/create.js b/src/test/moment/create.js index ba6ba4f9d..ac744b389 100644 --- a/src/test/moment/create.js +++ b/src/test/moment/create.js @@ -1103,5 +1103,6 @@ test('parsing only meridiem results in invalid date', function (assert) { test('invalid dates return invalid for methods that access the _d prop', function (assert) { var momentAsDate = moment(['2015', '12', '1']).toDate(); - assert.equal(momentAsDate, 'Invalid Date', 'toDate returns invalid'); + assert.ok(momentAsDate instanceof Date, 'toDate returns a Date object'); + assert.ok(isNaN(momentAsDate.getTime()), 'toDate returns an invalid Date invalid'); });