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:
parent
d1ffeaf66d
commit
596324ae9c
3 changed files with 29 additions and 20 deletions
|
@ -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");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue