summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/WeakMap/prototype/set/returns-this.js
blob: dd30cc2e77dbbd38a9387b5fefdb0023af55481a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-weakmap.prototype.set
description: Returns `this` after setting a new value.
info: |
  WeakMap.prototype.set ( key, value )

  1. Let M be this value.
  ...
  9. Return M.

---*/

var map = new WeakMap();

assert.sameValue(map.set({}, 1), map, '`map.set({}, 1)` returns `map`');

reportCompare(0, 0);