summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Temporal/TimeZone/from/timezone-instance-does-not-get-timeZone-property.js
blob: 8969c308509c85b65ca1cac4b5001f48c64e6698 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// |reftest| skip -- Temporal is not supported
// 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: >
  A Temporal.TimeZone instance passed to from() does not have its
  'timeZone' property observably checked
features: [Temporal]
---*/

const timeZone = new Temporal.TimeZone("UTC");
Object.defineProperty(timeZone, "timeZone", {
  get() {
    throw new Test262Error("timeZone.timeZone should not be accessed");
  },
});

Temporal.TimeZone.from(timeZone);
Temporal.TimeZone.from({ timeZone });

reportCompare(0, 0);