mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
LibJS: Allow methods in classes named 'async'
Also add tests for all static, setter and getter cases.
This commit is contained in:
parent
65bebb5241
commit
2c6183da1e
8 changed files with 85 additions and 1 deletions
|
@ -85,3 +85,14 @@ describe("errors", () => {
|
|||
}`).not.toEval();
|
||||
});
|
||||
});
|
||||
|
||||
test("static getter named 'async'", () => {
|
||||
class A {
|
||||
static get async() {
|
||||
return "static getter named async";
|
||||
}
|
||||
}
|
||||
|
||||
expect("async" in A).toBeTrue();
|
||||
expect(A.async).toBe("static getter named async");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue