mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +00:00
LibJS: Support numeric literal expressions in nullish object exceptions
This commit is contained in:
parent
2d603c7c3f
commit
bfcfe6ce35
Notes:
sideshowbarker
2024-07-16 23:34:49 +09:00
Author: https://github.com/trflynn89
Commit: bfcfe6ce35
Pull-request: https://github.com/SerenityOS/serenity/pull/23802
3 changed files with 16 additions and 2 deletions
|
@ -47,11 +47,17 @@ test("null/undefined array index", () => {
|
|||
|
||||
expect(() => {
|
||||
foo[0].bar;
|
||||
}).toThrowWithMessage(TypeError, `Cannot access property "bar" on ${value} object`);
|
||||
}).toThrowWithMessage(
|
||||
TypeError,
|
||||
`Cannot access property "bar" on ${value} object "foo[0]"`
|
||||
);
|
||||
|
||||
expect(() => {
|
||||
foo[0].bar = 1;
|
||||
}).toThrowWithMessage(TypeError, `Cannot access property "bar" on ${value} object`);
|
||||
}).toThrowWithMessage(
|
||||
TypeError,
|
||||
`Cannot access property "bar" on ${value} object "foo[0]"`
|
||||
);
|
||||
|
||||
expect(() => {
|
||||
foo[index].bar;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue