From: Iskren Chernev Date: Wed, 9 Dec 2015 08:13:26 +0000 (-0800) Subject: Fix tests for all timezones X-Git-Tag: 2.11.0~18^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=331029bbc1c29f455c9604d7b20a0255f2940994;p=thirdparty%2Fmoment.git Fix tests for all timezones --- diff --git a/src/test/moment/now.js b/src/test/moment/now.js index 6b94170b3..ee493df81 100644 --- a/src/test/moment/now.js +++ b/src/test/moment/now.js @@ -23,7 +23,7 @@ test('now - custom value', function (assert) { try { assert.ok(moment().toISOString() === CUSTOM_DATE, 'moment() constructor should use the function defined by moment.now, but it did not'); - assert.ok(moment([]).toISOString() === '2015-01-01T00:00:00.000Z', 'moment() constructor should fall back to the date defined by moment.now when an empty array is given, but it did not'); + assert.ok(moment.utc().toISOString() === CUSTOM_DATE, 'moment() constructor should use the function defined by moment.now, but it did not'); assert.ok(moment.utc([]).toISOString() === '2015-01-01T00:00:00.000Z', 'moment() constructor should fall back to the date defined by moment.now when an empty array is given, but it did not'); } finally { moment.fn.now = oldFn;