mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 23:22:07 +00:00
LibJS/Tests: Test ShadowRealm.prototype.evaluate() this value type check
This commit is contained in:
parent
09536f5f48
commit
fb85fd4867
1 changed files with 6 additions and 0 deletions
|
@ -56,6 +56,12 @@ describe("normal behavior", () => {
|
|||
});
|
||||
|
||||
describe("errors", () => {
|
||||
test("this value must be a ShadowRealm object", () => {
|
||||
expect(() => {
|
||||
ShadowRealm.prototype.evaluate.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type ShadowRealm");
|
||||
});
|
||||
|
||||
test("throws for non-string input", () => {
|
||||
const shadowRealm = new ShadowRealm();
|
||||
const values = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue