Skip to content

Commit 789306b

Browse files
ptomato12wrigja
authored andcommitted
Remove tests from Demitasse that landed in test262
UPSTREAM_COMMIT=94d32a7ea820ba10502ae65284c4742f30762e0e
1 parent d730c6f commit 789306b

File tree

3 files changed

+3
-297
lines changed

3 files changed

+3
-297
lines changed

test/duration.mjs

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -851,20 +851,12 @@ describe('Duration', () => {
851851
equal(`${hours25.round({ largestUnit: 'days', relativeTo: { year: 2019, month: 11, day: 2 } })}`, 'P1DT1H');
852852
});
853853
it('accepts datetime string equivalents or fields for relativeTo', () => {
854-
['2020-01-01', '2020-01-01T00:00:00.000000000', 20200101, 20200101n, { year: 2020, month: 1, day: 1 }].forEach(
854+
['2020-01-01', '2020-01-01T00:00:00.000000000', 20200101n, { year: 2020, month: 1, day: 1 }].forEach(
855855
(relativeTo) => {
856856
equal(`${d.round({ smallestUnit: 'seconds', relativeTo })}`, 'P5Y5M5W5DT5H5M5S');
857857
}
858858
);
859859
});
860-
it("throws on relativeTo that can't be converted to datetime string", () => {
861-
throws(() => d.round({ smallestUnit: 'seconds', relativeTo: Symbol('foo') }), TypeError);
862-
});
863-
it('throws on relativeTo that converts to an invalid datetime string', () => {
864-
[3.14, true, null, 'hello', 1n].forEach((relativeTo) => {
865-
throws(() => d.round({ smallestUnit: 'seconds', relativeTo }), RangeError);
866-
});
867-
});
868860
it('throws on wrong offset for ZonedDateTime relativeTo string', () => {
869861
throws(
870862
() => d.round({ smallestUnit: 'seconds', relativeTo: '1971-01-01T00:00+02:00[Africa/Monrovia]' }),
@@ -1252,7 +1244,7 @@ describe('Duration', () => {
12521244
equal(s, 0.002031);
12531245
});
12541246
it('accepts datetime string equivalents or fields for relativeTo', () => {
1255-
['2020-01-01', '2020-01-01T00:00:00.000000000', 20200101, 20200101n, { year: 2020, month: 1, day: 1 }].forEach(
1247+
['2020-01-01', '2020-01-01T00:00:00.000000000', 20200101n, { year: 2020, month: 1, day: 1 }].forEach(
12561248
(relativeTo) => {
12571249
const daysPastJuly1 = 5 * 7 + 5 - 30; // 5 weeks + 5 days - 30 days in June
12581250
const partialDayNanos =
@@ -1270,14 +1262,6 @@ describe('Duration', () => {
12701262
}
12711263
);
12721264
});
1273-
it("throws on relativeTo that can't be converted to datetime string", () => {
1274-
throws(() => d.total({ unit: 'months', relativeTo: Symbol('foo') }), TypeError);
1275-
});
1276-
it('throws on relativeTo that converts to an invalid datetime string', () => {
1277-
[3.14, true, null, 'hello', 1n].forEach((relativeTo) => {
1278-
throws(() => d.total({ unit: 'months', relativeTo }), RangeError);
1279-
});
1280-
});
12811265
it('throws on wrong offset for ZonedDateTime relativeTo string', () => {
12821266
throws(() => d.total({ unit: 'months', relativeTo: '1971-01-01T00:00+02:00[Africa/Monrovia]' }), RangeError);
12831267
});

0 commit comments

Comments
 (0)