]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Fix tests for all timezones
authorIskren Chernev <iskren.chernev@gmail.com>
Wed, 9 Dec 2015 08:13:26 +0000 (00:13 -0800)
committerIskren Chernev <iskren.chernev@gmail.com>
Wed, 9 Dec 2015 08:13:26 +0000 (00:13 -0800)
src/test/moment/now.js

index 6b94170b33eba4f82f7f96e9ad361abab687a970..ee493df819fdda62a33ebb289969949f55a2e8ad 100644 (file)
@@ -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;