Skip to content

Commit

Permalink
test: add a test for the await(...) case
Browse files Browse the repository at this point in the history
  • Loading branch information
neriyarden authored and MichaelDeBoey committed Oct 19, 2024
1 parent 50742f6 commit 6120e73
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/lib/rules/no-await-sync-queries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,19 @@ ruleTester.run(RULE_NAME, rule, {
output: `
async () => {
const element = getByIcon('search')
const element = getByIcon('search')
}
`,
},
{
code: `
async () => {
const element = await(getByIcon('search'))
}
`,
errors: [{ messageId: 'noAwaitSyncQuery', line: 3, column: 31 }],
output: `
async () => {
const element = (getByIcon('search'))
}
`,
},
Expand Down

0 comments on commit 6120e73

Please sign in to comment.