Add a test for class property named async (#19634)

This commit is contained in:
fisker Cheung authored and GitHub committed 2026-07-15 21:48:02 +08:00
1 parent 4a44785065
commit dbda419df3
2 files changed
+68

No files matched your search

@@ -59,6 +59,65 @@ class B {
================================================================================
`;
exports[`async-no-semi.js - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
semi: false
printWidth: 80 (default) |
=====================================input======================================
class A {
static async
foo() {}
}
class B {
async
foo() {}
}
=====================================output=====================================
class A {
static async
foo() {}
}
class B {
async
foo() {}
}
================================================================================
`;
exports[`async-no-semi.js format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
printWidth: 80 (default) |
=====================================input======================================
class A {
static async
foo() {}
}
class B {
async
foo() {}
}
=====================================output=====================================
class A {
static async;
foo() {}
}
class B {
async;
foo() {}
}
================================================================================
`;
exports[`computed.js - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["babel", "flow", "typescript"]
@@ -0,0 +1,9 @@
class A {
static async
foo() {}
}
class B {
async
foo() {}
}