mirror of
https://github.com/tc39/test262.git
synced 2025-08-23 02:48:28 +02:00
20 lines
597 B
JavaScript
20 lines
597 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.plaindate.from
|
|
description: An exception from TimeZone#getOffsetNanosecondsFor() is propagated.
|
|
features: [Temporal]
|
|
---*/
|
|
|
|
class TZ extends Temporal.TimeZone {
|
|
constructor() { super("UTC") }
|
|
getOffsetNanosecondsFor() { throw new Test262Error() }
|
|
}
|
|
|
|
const tz = new TZ();
|
|
const arg = new Temporal.ZonedDateTime(0n, tz);
|
|
const instance = new Temporal.PlainDate(1976, 11, 18);
|
|
|
|
assert.throws(Test262Error, () => Temporal.PlainDate.from(arg));
|