]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Remove duplicate tests
authorMatt Johnson <mj1856@hotmail.com>
Sun, 13 Mar 2016 02:40:44 +0000 (18:40 -0800)
committerIskren Chernev <iskren.chernev@gmail.com>
Thu, 24 Mar 2016 10:57:09 +0000 (03:57 -0700)
These are already in zone_switching.js

src/test/moment/utc_offset.js

index 6768293bb8fb03cce7f36128a7877b5b432c0746..8f2a8f298f453bc882d847803915790968fc56f8 100644 (file)
@@ -476,94 +476,3 @@ test('timezone format', function (assert) {
     assert.equal(moment().utcOffset(-90).format('ZZ'), '-0130', '+90 -> -0130');
     assert.equal(moment().utcOffset(-120).format('ZZ'), '-0200', '+120 -> -0200');
 });
-
-test('local to utc, keepLocalTime = true', function (assert) {
-    var m = moment(),
-        fmt = 'YYYY-DD-MM HH:mm:ss';
-    assert.equal(m.clone().utc(true).format(fmt), m.format(fmt), 'local to utc failed to keep local time');
-});
-
-test('local to utc, keepLocalTime = false', function (assert) {
-    var m = moment();
-    assert.equal(m.clone().utc().valueOf(), m.valueOf(), 'local to utc failed to keep utc time (implicit)');
-    assert.equal(m.clone().utc(false).valueOf(), m.valueOf(), 'local to utc failed to keep utc time (explicit)');
-});
-
-test('local to zone, keepLocalTime = true', function (assert) {
-    var m = moment(),
-        fmt = 'YYYY-DD-MM HH:mm:ss',
-        z;
-
-    // Apparently there is -12:00 and +14:00
-    // http://en.wikipedia.org/wiki/UTC+14:00
-    // http://en.wikipedia.org/wiki/UTC-12:00
-    for (z = -12; z <= 14; ++z) {
-        assert.equal(m.clone().utcOffset(z * 60, true).format(fmt),
-                m.format(fmt),
-                'local to utcOffset(' + z + ':00) failed to keep local time');
-    }
-});
-
-test('local to zone, keepLocalTime = false', function (assert) {
-    var m = moment(),
-        z;
-
-    // Apparently there is -12:00 and +14:00
-    // http://en.wikipedia.org/wiki/UTC+14:00
-    // http://en.wikipedia.org/wiki/UTC-12:00
-    for (z = -12; z <= 14; ++z) {
-        assert.equal(m.clone().utcOffset(z * 60).valueOf(),
-                m.valueOf(),
-                'local to utcOffset(' + z + ':00) failed to keep utc time (implicit)');
-        assert.equal(m.clone().utcOffset(z * 60, false).valueOf(),
-                m.valueOf(),
-                'local to utcOffset(' + z + ':00) failed to keep utc time (explicit)');
-    }
-});
-
-test('utc to local, keepLocalTime = true', function (assert) {
-    var um = moment.utc(),
-        fmt = 'YYYY-DD-MM HH:mm:ss';
-
-    assert.equal(um.clone().local(true).format(fmt), um.format(fmt), 'utc to local failed to keep local time');
-});
-
-test('utc to local, keepLocalTime = false', function (assert) {
-    var um = moment.utc();
-    assert.equal(um.clone().local().valueOf(), um.valueOf(), 'utc to local failed to keep utc time (implicit)');
-    assert.equal(um.clone().local(false).valueOf(), um.valueOf(), 'utc to local failed to keep utc time (explicit)');
-});
-
-test('zone to local, keepLocalTime = true', function (assert) {
-    var m = moment(),
-        fmt = 'YYYY-DD-MM HH:mm:ss',
-        z;
-
-    // Apparently there is -12:00 and +14:00
-    // http://en.wikipedia.org/wiki/UTC+14:00
-    // http://en.wikipedia.org/wiki/UTC-12:00
-    for (z = -12; z <= 14; ++z) {
-        m.utcOffset(z * 60);
-
-        assert.equal(m.clone().local(true).format(fmt),
-                m.format(fmt),
-                'utcOffset(' + z + ':00) to local failed to keep local time');
-    }
-});
-
-test('zone to local, keepLocalTime = false', function (assert) {
-    var m = moment(),
-        z;
-
-    // Apparently there is -12:00 and +14:00
-    // http://en.wikipedia.org/wiki/UTC+14:00
-    // http://en.wikipedia.org/wiki/UTC-12:00
-    for (z = -12; z <= 14; ++z) {
-        m.utcOffset(z * 60);
-
-        assert.equal(m.clone().local(false).valueOf(), m.valueOf(),
-                'utcOffset(' + z + ':00) to local failed to keep utc time (explicit)');
-        assert.equal(m.clone().local().valueOf(), m.valueOf(),
-                'utcOffset(' + z + ':00) to local failed to keep utc time (implicit)');
-    }
-});