summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/intl402/ListFormat/prototype/resolvedOptions/caching.js
blob: 7570e6eb662ba7e9990ee64ea4ee033f32c7c4dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright 2018 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-Intl.ListFormat.prototype.resolvedOptions
description: Verifies that the return value of Intl.ListFormat.prototype.resolvedOptions() is not cached.
info: |
    Intl.ListFormat.prototype.resolvedOptions ()

    4. Let options be ! ObjectCreate(%ObjectPrototype%).
features: [Intl.ListFormat]
---*/

const lf = new Intl.ListFormat("en-us");
const options1 = lf.resolvedOptions();
const options2 = lf.resolvedOptions();
assert.notSameValue(options1, options2, "Should create a new object each time.");

reportCompare(0, 0);