mirror of https://github.com/tc39/test262.git
Remove intl402/Temporal/TimeZone/from/argument-invalid test
Currently, this test is not conformant to the proposal text. Temporal.TimeZone.from() calls ToTemporalTimeZone. Since the argument is a string, we next go to ParseTemporalTimeZone, where on a string such as `1994-11-05T08:15:30-05:00[UTC]` we would return _result_.[[Name]] (which would be equal to `UTC`) and discard the UTC offset string.
This commit is contained in:
parent
1d09acaac1
commit
58cffd9f57
|
@ -1,18 +0,0 @@
|
|||
// Copyright (C) 2020 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.timezone.from
|
||||
description: TimeZone.from() with bad offsets in ISO strings.
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
const invalids = [
|
||||
"1994-11-05T08:15:30-05:00[UTC]",
|
||||
"1994-11-05T13:15:30+00:00[America/New_York]",
|
||||
"1994-11-05T13:15:30-03[Europe/Brussels]",
|
||||
];
|
||||
|
||||
for (const item of invalids) {
|
||||
assert.throws(RangeError, () => Temporal.TimeZone.from(item), `Throws for ${item}`);
|
||||
}
|
Loading…
Reference in New Issue