Skip to content

Commit 6663e2c

Browse files
ptomato12wrigja
authored andcommitted
Remove some Instant and ZDT tests ported to test262
UPSTREAM_COMMIT=4037866d84fcd2ec0da7648c9b0d2ece0825d07b
1 parent c1fae10 commit 6663e2c

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

test/instant.mjs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ const { Instant } = Temporal;
1919

2020
describe('Instant', () => {
2121
describe('Instant.from() works', () => {
22-
it('Instant.from(instant) is not the same object', () => {
23-
const inst = Instant.from('2020-02-12T11:42+01:00[Europe/Amsterdam]');
24-
notEqual(Instant.from(inst), inst);
25-
});
26-
it('Instant.from(ISO string leap second) is constrained', () => {
27-
equal(`${Instant.from('2016-12-31T23:59:60Z')}`, '2016-12-31T23:59:59Z');
28-
});
2922
it('variant time separators', () => {
3023
equal(`${Instant.from('1976-11-18t15:23Z')}`, '1976-11-18T15:23:00Z');
3124
equal(`${Instant.from('1976-11-18 15:23Z')}`, '1976-11-18T15:23:00Z');

test/zoneddatetime.mjs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,6 @@ describe('ZonedDateTime', () => {
189189
equal(zdt.toInstant().epochSeconds, Math.floor(Date.UTC(1976, 10, 18, 15, 23, 30, 123) / 1e3), 'epochSeconds');
190190
equal(zdt.toInstant().epochMilliseconds, Date.UTC(1976, 10, 18, 15, 23, 30, 123), 'epochMilliseconds');
191191
});
192-
it('Temporal.ZonedDateTime.from(zonedDateTime) is not the same object)', () => {
193-
const zdt = new ZonedDateTime(epochNanos, tz);
194-
notEqual(ZonedDateTime.from(zdt), zdt);
195-
});
196192

197193
describe('ZonedDateTime for (1976, 11, 18, 15, 23, 30, 123, 456, 789)', () => {
198194
const zdt = new ZonedDateTime(epochNanos, new Temporal.TimeZone('UTC'));
@@ -311,12 +307,6 @@ describe('ZonedDateTime', () => {
311307
const zdt = ZonedDateTime.from('2020-03-08T09:00:00Z[America/Los_Angeles]');
312308
equal(zdt.toString(), '2020-03-08T01:00:00-08:00[America/Los_Angeles]');
313309
});
314-
it('ZonedDateTime.from(ISO string leap second) is constrained', () => {
315-
equal(
316-
`${ZonedDateTime.from('2016-12-31T23:59:60-08:00[America/Vancouver]')}`,
317-
'2016-12-31T23:59:59-08:00[America/Vancouver]'
318-
);
319-
});
320310
it('variant time separators', () => {
321311
['1976-11-18t15:23-08:00[America/Los_Angeles]', '1976-11-18 15:23-08:00[America/Los_Angeles]'].forEach((input) =>
322312
equal(`${ZonedDateTime.from(input)}`, '1976-11-18T15:23:00-08:00[America/Los_Angeles]')
@@ -613,10 +603,6 @@ describe('ZonedDateTime', () => {
613603
throws(() => ZonedDateTime.from({ year: 2019, month: 1, day: 1, timeZone: lagos }, { overflow }), RangeError);
614604
});
615605
});
616-
const leap = { year: 2016, month: 12, day: 31, hour: 23, minute: 59, second: 60, timeZone: lagos };
617-
it('reject leap second', () => throws(() => ZonedDateTime.from(leap, { overflow: 'reject' }), RangeError));
618-
it('constrain leap second', () =>
619-
equal(`${ZonedDateTime.from(leap)}`, '2016-12-31T23:59:59+01:00[Africa/Lagos]'));
620606
});
621607
describe('Offset option', () => {
622608
it("{ offset: 'reject' } throws if offset does not match offset time zone", () => {

0 commit comments

Comments
 (0)