mirror of
https://github.com/tc39/test262.git
synced 2025-07-31 01:44:54 +02:00
Fix tests issues
This commit is contained in:
parent
6a5b818896
commit
227977a8e6
@ -19,7 +19,7 @@ const s = r.evaluate('Symbol("foobar")');
|
||||
assert.sameValue(typeof s, 'symbol');
|
||||
assert.sameValue(s.constructor, Symbol, 'primitive does not expose other ShadowRealm constructor');
|
||||
assert.sameValue(Object.getPrototypeOf(s), Symbol.prototype);
|
||||
assert.sameValue(Symbol.prototype.toString.call(s), 'Symbol()');
|
||||
assert.sameValue(Symbol.prototype.toString.call(s), 'Symbol(foobar)');
|
||||
|
||||
const shadowX = r.evaluate('Symbol.for("my symbol name")');
|
||||
const myX = Symbol.for('my symbol name')
|
||||
@ -42,8 +42,10 @@ assert.sameValue(
|
||||
'Symbol.keyFor cannot find a key for a regular symbol created in the shadow realm'
|
||||
);
|
||||
|
||||
const { get: description } = Object.getOwnPropertyDescriptor(Symbol.prototype, 'description');
|
||||
|
||||
assert.sameValue(
|
||||
Symbol.prototype.description.call(s),
|
||||
description.call(s),
|
||||
'foobar',
|
||||
'get description for the symbol created in the shadow realm'
|
||||
);
|
||||
|
@ -12,7 +12,7 @@ const realm2 = new ShadowRealm();
|
||||
|
||||
globalThis.count = 0;
|
||||
|
||||
asserts.notSameValue(realm1, realm2);
|
||||
assert.notSameValue(realm1, realm2);
|
||||
|
||||
const r1wrapped = realm1.evaluate(`
|
||||
globalThis.count = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user