From 227977a8e64231013ed8590e8af4221778295400 Mon Sep 17 00:00:00 2001 From: Leo Balter Date: Tue, 14 Sep 2021 08:12:34 -0700 Subject: [PATCH] Fix tests issues --- .../ShadowRealm/prototype/evaluate/returns-symbol-values.js | 6 ++++-- .../evaluate/wrapped-function-multiple-different-realms.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/built-ins/ShadowRealm/prototype/evaluate/returns-symbol-values.js b/test/built-ins/ShadowRealm/prototype/evaluate/returns-symbol-values.js index 8249548dbf..639faa1d21 100644 --- a/test/built-ins/ShadowRealm/prototype/evaluate/returns-symbol-values.js +++ b/test/built-ins/ShadowRealm/prototype/evaluate/returns-symbol-values.js @@ -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' ); diff --git a/test/built-ins/ShadowRealm/prototype/evaluate/wrapped-function-multiple-different-realms.js b/test/built-ins/ShadowRealm/prototype/evaluate/wrapped-function-multiple-different-realms.js index 2ada3f4dda..b68bd01e12 100644 --- a/test/built-ins/ShadowRealm/prototype/evaluate/wrapped-function-multiple-different-realms.js +++ b/test/built-ins/ShadowRealm/prototype/evaluate/wrapped-function-multiple-different-realms.js @@ -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;