mirror of
https://github.com/tc39/test262.git
synced 2025-07-31 01:44:54 +02:00
In these tests, we should make a distinction in the name for clarity. It's testing a time zone passed as a property in a property bag (either as an argument, or as a relativeTo option), so name it accordingly as we do with other tests in the same folder.
14 lines
492 B
JavaScript
14 lines
492 B
JavaScript
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
esid: sec-temporal.zoneddatetime.from
|
|
description: Time zone IDs are valid input for a time zone
|
|
features: [Temporal]
|
|
---*/
|
|
|
|
["UTC", "+01:30"].forEach((timeZone) => {
|
|
const result = Temporal.ZonedDateTime.from({ year: 2000, month: 5, day: 2, timeZone });
|
|
assert.sameValue(result.timeZone.id, timeZone, `Time zone created from string "${timeZone}"`);
|
|
});
|