diff --git a/src/__tests__/role.js b/src/__tests__/role.js index 58685d76..a187a77b 100644 --- a/src/__tests__/role.js +++ b/src/__tests__/role.js @@ -343,6 +343,12 @@ Here are the accessible roles: `) }) +test('has no useful error message in findBy', async () => { + const {findByRole} = render(`
  • `) + + await expect(findByRole('option', {timeout: 1})).rejects.toThrow('Unable to find role="option"') +}) + test('explicit role is most specific', () => { const {getByRole} = renderIntoDocument( `