Skip to content

Commit

Permalink
test(eslint-plugin): add regression tests for invalid async modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
madbence committed May 27, 2019
1 parent cca1714 commit 52b4696
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions packages/eslint-plugin/tests/rules/promise-function-async.test.ts
Expand Up @@ -42,6 +42,29 @@ class Test {
public async asyncPromiseMethodB() {
return new Promise<void>();
}
}
`,
`
class InvalidAsyncModifiers {
public constructor() {
return new Promise<void>();
}
public get asyncGetter() {
return new Promise<void>();
}
public set asyncGetter(p: Promise<void>) {
return p;
}
}
`,
`
const invalidAsyncModifiers = {
get asyncGetter() {
return new Promise<void>();
},
set asyncGetter(p: Promise<void>) {
return p;
}
}
`,
// https://github.com/typescript-eslint/typescript-eslint/issues/227
Expand Down

0 comments on commit 52b4696

Please sign in to comment.