Skip to content

Commit afdd27a

Browse files
neriyardenMichaelDeBoey
authored andcommitted
test: add a test for the await(...) case
1 parent c5c9ea7 commit afdd27a

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/lib/rules/no-await-sync-queries.test.ts

+13-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,19 @@ ruleTester.run(RULE_NAME, rule, {
159159
output: `
160160
async () => {
161161
const element = getByIcon('search')
162-
const element = getByIcon('search')
162+
}
163+
`,
164+
},
165+
{
166+
code: `
167+
async () => {
168+
const element = await(getByIcon('search'))
169+
}
170+
`,
171+
errors: [{ messageId: 'noAwaitSyncQuery', line: 3, column: 31 }],
172+
output: `
173+
async () => {
174+
const element = (getByIcon('search'))
163175
}
164176
`,
165177
},

0 commit comments

Comments
 (0)