mirror of https://github.com/tc39/test262.git
Fix unexpected pass on ShadowRealm wrapped function (#3312)
This commit is contained in:
parent
cba42e88c7
commit
d52b510a33
|
@ -16,6 +16,12 @@ assert.sameValue(
|
|||
const r = new ShadowRealm();
|
||||
const wrappedFunction = r.evaluate('() => {}');
|
||||
|
||||
assert.sameValue(
|
||||
typeof wrappedFunction,
|
||||
'function',
|
||||
'This test must fail if wrappedFunction is not a function'
|
||||
);
|
||||
|
||||
assert.throws(TypeError, () => wrappedFunction(1, globalThis), 'globalThis');
|
||||
assert.throws(TypeError, () => wrappedFunction(1, []), 'array literal');
|
||||
assert.throws(TypeError, () => wrappedFunction(1, {
|
||||
|
|
Loading…
Reference in New Issue