mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +00:00
LibJS: Add ErrorType::ConstructorWithoutNew
...and use it in Proxy::call(), rather than having a specific error type just for that.
This commit is contained in:
parent
7fb299fe46
commit
1bff65c591
3 changed files with 4 additions and 3 deletions
|
@ -33,5 +33,5 @@ test("constructor requires objects", () => {
|
|||
test("constructor must be invoked with 'new'", () => {
|
||||
expect(() => {
|
||||
Proxy({}, {});
|
||||
}).toThrowWithMessage(TypeError, "Proxy must be called with the 'new' operator");
|
||||
}).toThrowWithMessage(TypeError, "Proxy constructor must be called with 'new'");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue