Skip to content

Commit da1f856

Browse files
committed
Add test
1 parent 08417f1 commit da1f856

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/__tests__/role.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,12 @@ Here are the accessible roles:
343343
`)
344344
})
345345

346+
test('has no useful error message in findBy', async () => {
347+
const {findByRole} = render(`<li />`)
348+
349+
await expect(findByRole('option', {timeout: 1})).rejects.toThrow('Unable to find role="option"')
350+
})
351+
346352
describe('configuration', () => {
347353
let originalConfig
348354
beforeEach(() => {

0 commit comments

Comments
 (0)