mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibJS/Tests: Test ShadowRealm.prototype.evaluate() this value type check
This commit is contained in:
parent
09536f5f48
commit
fb85fd4867
Notes:
sideshowbarker
2024-07-18 02:21:57 +09:00
Author: https://github.com/linusg
Commit: fb85fd4867
Pull-request: https://github.com/SerenityOS/serenity/pull/10479
Reviewed-by: https://github.com/IdanHo ✅
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