summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/intl402/DurationFormat/prototype/resolvedOptions/throw-invoked-as-func.js
blob: a75c9f2bb425c43f13914f6fa36498d3a34451ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// |reftest| skip -- Intl.DurationFormat 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-intl.DurationFormat.prototype.resolvedOptions
description: basic tests internal slot initialization and call receiver errors
info: |
  Intl.DurationFormat.prototype.resolvedOptions ( )
  (...)
    2. Perform ? RequireInternalSlot(df, [[InitializedDurationFormat]]).
features: [Intl.DurationFormat]
---*/

const df = new Intl.DurationFormat();

// Perform ? RequireInternalSlot(df, [[InitializedDurationFormat]]).
let f = df['resolvedOptions'];

assert.sameValue(typeof f, 'function');
assert.throws(TypeError, () => { f() });


reportCompare(0, 0);