Add WrappedFunction coverage on non-callable proxy

This commit is contained in:
legendecas 2021-10-22 15:03:49 +08:00 committed by Rick Waldron
parent 100af9014e
commit fcaa7594a4
2 changed files with 2 additions and 0 deletions

View File

@ -24,3 +24,4 @@ assert.throws(TypeError, () => wrappedFunction(1, {
valueOf() { return 1; }
}), 'object literal with immediate primitive coercion methods');
assert.throws(TypeError, () => wrappedFunction(1, Object.create(null)), 'ordinary object with null __proto__');
assert.throws(TypeError, () => wrappedFunction(1, new Proxy({}, { apply() {} })), 'non-callable proxy');

View File

@ -25,3 +25,4 @@ assert.throws(TypeError, r.evaluate(`
});
`), 'object literal with immediate primitive coercion methods');
assert.throws(TypeError, r.evaluate('() => Object.create(null)'), 'ordinary object with null __proto__');
assert.throws(TypeError, r.evaluate('() => new Proxy({}, { apply() {} })'), 'non-callable proxy');