Skip to content

Commit 56df93f

Browse files
ptomato12wrigja
authored andcommitted
Update test262 and remove ported Demitasse tests
UPSTREAM_COMMIT=48cfedef5e5d1bb898c81593c713f5528c6d13aa
1 parent 926963b commit 56df93f

File tree

4 files changed

+1
-39
lines changed

4 files changed

+1
-39
lines changed

test/instant.mjs

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

2020
describe('Instant', () => {
2121
describe('Instant.from() works', () => {
22-
it('variant time separators', () => {
23-
equal(`${Instant.from('1976-11-18t15:23Z')}`, '1976-11-18T15:23:00Z');
24-
equal(`${Instant.from('1976-11-18 15:23Z')}`, '1976-11-18T15:23:00Z');
25-
});
2622
it('variant UTC designator', () => {
2723
equal(`${Instant.from('1976-11-18T15:23z')}`, '1976-11-18T15:23:00Z');
2824
});

test/regex.mjs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ describe('fromString regex', () => {
3636
describe('valid', () => {
3737
// Without time component
3838
test('2020-01-01Z', [2020, 1, 1, 0, 0, 0]);
39-
// Time separators
40-
['T', 't', ' '].forEach((timeSep) =>
41-
generateTest(`1976-11-18${timeSep}15:23`, 'Z', [1976, 11, 18, 15, 23, 30, 123, 456, 789])
42-
);
4339
// Time zone with bracketed name
4440
['+01:00', '+01', '+0100', '+01:00:00', '+010000', '+01:00:00.000000000', '+010000.0'].forEach((zoneString) => {
4541
generateTest('1976-11-18T15:23', `${zoneString}[Europe/Vienna]`, [1976, 11, 18, 14, 23, 30, 123, 456, 789]);
@@ -118,8 +114,6 @@ describe('fromString regex', () => {
118114
test(`${dateTimeString}:30.123456789${zoneString}`, components);
119115
}
120116
describe('valid', () => {
121-
// Time separators
122-
['T', 't', ' '].forEach((timeSep) => generateTest(`1976-11-18${timeSep}15:23`, ''));
123117
// Various forms of time zone
124118
[
125119
'+0100[Europe/Vienna]',
@@ -199,8 +193,6 @@ describe('fromString regex', () => {
199193
test(`${dateTimeString}:30${zoneString}`, components);
200194
test(`${dateTimeString}:30.123456789${zoneString}`, components);
201195
}
202-
// Time separators
203-
['T', 't', ' '].forEach((timeSep) => generateTest(`1976-11-18${timeSep}15:23`, ''));
204196
// Various forms of time zone
205197
[
206198
'+0100[Europe/Vienna]',
@@ -265,8 +257,6 @@ describe('fromString regex', () => {
265257
test(`${dateTimeString}:30${zoneString}`, components.slice(0, 3));
266258
test(`${dateTimeString}:30.123456789${zoneString}`, components);
267259
}
268-
// Time separators
269-
['T', 't', ' '].forEach((timeSep) => generateTest(`1976-11-18${timeSep}15:23`, ''));
270260
// Various forms of time zone
271261
[
272262
'+0100[Europe/Vienna]',
@@ -329,8 +319,6 @@ describe('fromString regex', () => {
329319
test(`${dateTimeString}:30${zoneString}`, components);
330320
test(`${dateTimeString}:30.123456789${zoneString}`, components);
331321
}
332-
// Time separators
333-
['T', 't', ' '].forEach((timeSep) => generateTest(`1976-11-18${timeSep}15:23`, ''));
334322
// Various forms of time zone
335323
[
336324
'+0100[Europe/Vienna]',
@@ -402,8 +390,6 @@ describe('fromString regex', () => {
402390
test(`${dateTimeString}:30${zoneString}`, components);
403391
test(`${dateTimeString}:30.123456789${zoneString}`, components);
404392
}
405-
// Time separators
406-
['T', 't', ' '].forEach((timeSep) => generateTest(`1976-11-18${timeSep}15:23`, ''));
407393
// Various forms of time zone
408394
[
409395
'+0100[Europe/Vienna]',
@@ -474,8 +460,6 @@ describe('fromString regex', () => {
474460
test(`${dateTimeString}:30${zoneString}`, expectedName);
475461
test(`${dateTimeString}:30.123456789${zoneString}`, expectedName);
476462
}
477-
// Time separators
478-
['T', 't', ' '].forEach((timeSep) => generateTest(`1976-11-18${timeSep}15:23`, 'Z', 'UTC'));
479463
// Time zone with bracketed name
480464
['+01:00', '+01', '+0100', '+01:00:00', '+010000', '+01:00:00.000000000', '+010000.0'].forEach((zoneString) => {
481465
generateTest('1976-11-18T15:23', `${zoneString}[Europe/Vienna]`, 'Europe/Vienna');

test/zoneddatetime.mjs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,6 @@ describe('ZonedDateTime', () => {
143143
it('ZonedDateTime.prototype.toLocaleString is a Function', () => {
144144
equal(typeof ZonedDateTime.prototype.toLocaleString, 'function');
145145
});
146-
it('ZonedDateTime.prototype.toJSON is a Function', () => {
147-
equal(typeof ZonedDateTime.prototype.toJSON, 'function');
148-
});
149146
it('ZonedDateTime.prototype.valueOf is a Function', () => {
150147
equal(typeof ZonedDateTime.prototype.valueOf, 'function');
151148
});
@@ -307,11 +304,6 @@ describe('ZonedDateTime', () => {
307304
const zdt = ZonedDateTime.from('2020-03-08T09:00:00Z[America/Los_Angeles]');
308305
equal(zdt.toString(), '2020-03-08T01:00:00-08:00[America/Los_Angeles]');
309306
});
310-
it('variant time separators', () => {
311-
['1976-11-18t15:23-08:00[America/Los_Angeles]', '1976-11-18 15:23-08:00[America/Los_Angeles]'].forEach((input) =>
312-
equal(`${ZonedDateTime.from(input)}`, '1976-11-18T15:23:00-08:00[America/Los_Angeles]')
313-
);
314-
});
315307
it('any number of decimal places', () => {
316308
equal(
317309
`${ZonedDateTime.from('1976-11-18T15:23:30.1-08:00[America/Los_Angeles]')}`,
@@ -2242,16 +2234,6 @@ describe('ZonedDateTime', () => {
22422234
equal(zdt6.epochNanoseconds - zdt5.epochNanoseconds, 1n);
22432235
});
22442236
});
2245-
describe('ZonedDateTime.toJSON()', () => {
2246-
it('does the default toString', () => {
2247-
const zdt1 = ZonedDateTime.from('1976-11-18T15:23+01:00[Europe/Vienna]');
2248-
const zdt2 = ZonedDateTime.from('1976-11-18T15:23:30+01:00[Europe/Vienna]');
2249-
const zdt3 = ZonedDateTime.from('1976-11-18T15:23:30.1234+01:00[Europe/Vienna]');
2250-
equal(zdt1.toJSON(), '1976-11-18T15:23:00+01:00[Europe/Vienna]');
2251-
equal(zdt2.toJSON(), '1976-11-18T15:23:30+01:00[Europe/Vienna]');
2252-
equal(zdt3.toJSON(), '1976-11-18T15:23:30.1234+01:00[Europe/Vienna]');
2253-
});
2254-
});
22552237
describe("Comparison operators don't work", () => {
22562238
const zdt1 = ZonedDateTime.from('1963-02-13T09:36:29.123456789+01:00[Europe/Vienna]');
22572239
const zdt1again = ZonedDateTime.from('1963-02-13T09:36:29.123456789+01:00[Europe/Vienna]');

test262

Submodule test262 updated 75 files

0 commit comments

Comments
 (0)