Philip Chimento bc0e006de4 Temporal: Add tests for casting a time zone ID string to a Temporal.TimeZone
This adds tests to every entry point where a Temporal.TimeZone is
accepted, making sure that a time zone ID string is also accepted.
2022-08-01 13:48:11 -07:00

14 lines
439 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.timezone.from
description: Time zone IDs are valid input for a time zone
features: [Temporal]
---*/
["UTC", "+01:30"].forEach((timeZone) => {
const result = Temporal.TimeZone.from(timeZone);
assert.sameValue(result.id, timeZone, `Time zone created from string "${timeZone}"`);
});