mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 04:37:55 +00:00
LibJS: Ensure a function follows an async identifier in objects
This commit is contained in:
committed by
Andreas Kling
parent
4eda7b5646
commit
a5455ac121
@@ -205,6 +205,14 @@ describe("shorthanded properties with special names", () => {
|
||||
expect('"use strict"; var await = 8; ({ await, })').toEval();
|
||||
expect('"use strict"; var async = 7; ({ async, })').toEval();
|
||||
});
|
||||
|
||||
test("async functions as properties", () => {
|
||||
expect("({ async foo });").not.toEval();
|
||||
expect("({ async foo, });").not.toEval();
|
||||
expect("({ async foo() });").not.toEval();
|
||||
expect("({ async foo: 0 });").not.toEval();
|
||||
expect("({ async foo = 0 });").not.toEval();
|
||||
});
|
||||
});
|
||||
|
||||
describe("errors", () => {
|
||||
|
||||
Reference in New Issue
Block a user