mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:07:34 +00:00
LibJS: Check type of ShadowRealm.prototype.importValue() 2nd argument
This is a normative change in the ShadowRealm spec.
See: 2b45a15
This commit is contained in:
parent
f1d744e11a
commit
68ee193464
2 changed files with 11 additions and 3 deletions
|
@ -70,4 +70,11 @@ describe("errors", () => {
|
|||
ShadowRealm.prototype.importValue.call("foo");
|
||||
}).toThrowWithMessage(TypeError, "Not an object of type ShadowRealm");
|
||||
});
|
||||
|
||||
test("export name must be string", () => {
|
||||
const shadowRealm = new ShadowRealm();
|
||||
expect(() => {
|
||||
shadowRealm.importValue("./whatever.mjs", 123);
|
||||
}).toThrowWithMessage(TypeError, "123 is not a string");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue