fix: ensure check for ShadowRealm at start of test

This commit is contained in:
rwaldron 2021-09-22 12:21:11 -04:00
parent 49819bc0bc
commit e4adfd8979
2 changed files with 11 additions and 0 deletions

View File

@ -7,6 +7,12 @@ description: >
features: [ShadowRealm]
---*/
assert.sameValue(
typeof ShadowRealm.prototype.evaluate,
'function',
'This test must fail if ShadowRealm.prototype.evaluate is not a function'
);
globalThis.myValue = 'a';
const realm1 = new ShadowRealm();

View File

@ -6,6 +6,11 @@ description: >
ShadowRealm can wrap a function to multiple nested realms.
features: [ShadowRealm]
---*/
assert.sameValue(
typeof ShadowRealm.prototype.evaluate,
'function',
'This test must fail if ShadowRealm.prototype.evaluate is not a function'
);
globalThis.count = 0;
const realm1 = new ShadowRealm();