diff --git a/packages/eslint-plugin/tests/rules/promise-function-async.test.ts b/packages/eslint-plugin/tests/rules/promise-function-async.test.ts index 3910cea5604..13b4a18c2e8 100644 --- a/packages/eslint-plugin/tests/rules/promise-function-async.test.ts +++ b/packages/eslint-plugin/tests/rules/promise-function-async.test.ts @@ -42,6 +42,29 @@ class Test { public async asyncPromiseMethodB() { return new Promise(); } +} + `, + ` +class InvalidAsyncModifiers { + public constructor() { + return new Promise(); + } + public get asyncGetter() { + return new Promise(); + } + public set asyncGetter(p: Promise) { + return p; + } +} + `, + ` +const invalidAsyncModifiers = { + get asyncGetter() { + return new Promise(); + }, + set asyncGetter(p: Promise) { + return p; + } } `, // https://github.com/typescript-eslint/typescript-eslint/issues/227