summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Libraries/LibJS/Tests/builtins/ShadowRealm/ShadowRealm.prototype.evaluate.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Tests/builtins/ShadowRealm/ShadowRealm.prototype.evaluate.js b/Userland/Libraries/LibJS/Tests/builtins/ShadowRealm/ShadowRealm.prototype.evaluate.js
index 8f01cec94f..d301b4e5eb 100644
--- a/Userland/Libraries/LibJS/Tests/builtins/ShadowRealm/ShadowRealm.prototype.evaluate.js
+++ b/Userland/Libraries/LibJS/Tests/builtins/ShadowRealm/ShadowRealm.prototype.evaluate.js
@@ -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 = [