1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:57:35 +00:00

LibJS: Rewrite String.raw() closer to the specification

This includes not throwing a custom exception and using the
length_of_array_like abstract operation where required.
This commit is contained in:
Idan Horowitz 2021-06-28 13:14:41 +03:00 committed by Linus Groh
parent d1ffeaf66d
commit 596324ae9c
3 changed files with 29 additions and 20 deletions

View file

@ -27,5 +27,5 @@ test("basic functionality", () => {
test("passing object with no 'raw' property", () => {
expect(() => {
String.raw({});
}).toThrowWithMessage(TypeError, "Cannot convert property 'raw' to object from undefined");
}).toThrowWithMessage(TypeError, "ToObject on null or undefined");
});