mirror of
https://github.com/tc39/test262.git
synced 2025-07-28 16:34:27 +02:00
Remove smallestunit-disallowed-units.js.
It is covered by smallestunit-invalid-string.js and largestunit-smallestunit-mismatch.js.
This commit is contained in:
parent
525313395b
commit
8848ee91e8
@ -1,28 +0,0 @@
|
|||||||
// Copyright (C) 2021 Igalia, S.L. All rights reserved.
|
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
|
||||||
|
|
||||||
/*---
|
|
||||||
esid: sec-temporal.plainyearmonth.prototype.since
|
|
||||||
description: Since throws on disallowed or invalid smallestUnit
|
|
||||||
features: [Temporal, arrow-function]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
const earlier = new Temporal.PlainYearMonth(2019, 1);
|
|
||||||
const later = new Temporal.PlainYearMonth(2021, 9);
|
|
||||||
|
|
||||||
[
|
|
||||||
'era',
|
|
||||||
'weeks',
|
|
||||||
'days',
|
|
||||||
'hours',
|
|
||||||
'minutes',
|
|
||||||
'seconds',
|
|
||||||
'milliseconds',
|
|
||||||
'microseconds',
|
|
||||||
'nanoseconds',
|
|
||||||
'nonsense'
|
|
||||||
].forEach((smallestUnit) => {
|
|
||||||
assert.throws(RangeError, () => later.since(earlier, { smallestUnit }),`throws on disallowed or invalid smallestUnit: ${smallestUnit}`);
|
|
||||||
});
|
|
||||||
|
|
||||||
assert.throws(RangeError, () => later.since(earlier, { largestUnit: 'months', smallestUnit: 'years' }), 'throws if smallestUnit is larger than largestUnit');
|
|
Loading…
x
Reference in New Issue
Block a user