test262/test/built-ins/Temporal/TimeZone/from/argument-object-invalid.js

12 lines
418 B
JavaScript

// 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 invalid objects.
features: [Temporal]
---*/
assert.throws(RangeError, () => Temporal.TimeZone.from({ timeZone: "local" }));
assert.throws(RangeError, () => Temporal.TimeZone.from({ timeZone: { timeZone: "UTC" } }));