mirror of
https://github.com/tc39/test262.git
synced 2025-09-24 10:38:30 +02:00
Enable strict mode testing for sm/WeakMap and add missing feature tag
This commit is contained in:
parent
85f840d474
commit
6ed990708f
@ -4,14 +4,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
flags:
|
|
||||||
- noStrict
|
|
||||||
info: |
|
info: |
|
||||||
requires shell-options
|
requires shell-options
|
||||||
description: |
|
description: |
|
||||||
pending
|
pending
|
||||||
esid: pending
|
esid: pending
|
||||||
|
features: [symbols-as-weakmap-keys]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var m = new WeakMap;
|
var m = new WeakMap;
|
||||||
var sym = Symbol();
|
var sym = Symbol();
|
||||||
m.set(sym, 0);
|
m.set(sym, 0);
|
||||||
@ -26,4 +26,3 @@ assert.throws(TypeError, () => m.set(sym1, 1));
|
|||||||
var sym2 = Symbol.hasInstance;
|
var sym2 = Symbol.hasInstance;
|
||||||
m.set(sym2, 2);
|
m.set(sym2, 2);
|
||||||
assert.sameValue(m.get(sym2), 2);
|
assert.sameValue(m.get(sym2), 2);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user