Debian Codegraph @

js/src/tests/non262/Map/getOrInsertComputed/getOrInsertComputed.js

raw
1 // |reftest| shell-option(--enable-upsert) skip-if(!Map.prototype.getOrInsertComputed)
2 // Copyright (C) 2015 the V8 project authors. All rights reserved.
3 // Copyright (C) 2024 Jonas Haukenes, Mathias Ness. All rights reserved.
4 // This code is governed by the BSD license found in the LICENSE file.
5 /*---
6 esid: proposal-upsert
7 description: >
8 Property type and descriptor.
9 info: |
10 Map.prototype.getOrInsertComputed ( key , callbackfn )
11
12 17 ECMAScript Standard Built-in Objects
13
14 includes: [propertyHelper.js]
15 features: [arrow-function]
16 ---*/
17
18 assertEq(
19 typeof Map.prototype.getOrInsertComputed,
20 'function',
21 '`typeof Map.prototype.getOrInsertComputed` is `function`'
22 );
23
24 assertDeepEq(Object.getOwnPropertyDescriptor(Map.prototype, "getOrInsertComputed"), {
25 value: Map.prototype.getOrInsertComputed,
26 writable: true,
27 enumerable: false,
28 configurable: true
29 });
30
31 reportCompare(0, 0);