Skip to content

Commit 3f6bedb

Browse files
committed
Expand what we mean by "useful error message"
1 parent 0c1aa00 commit 3f6bedb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/__tests__/element-queries.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ test('get throws a useful error message', () => {
3232
getByAltText,
3333
getByTitle,
3434
getByRole,
35-
} = render('<div />')
35+
} = render(
36+
`<div></div><!-- Ignored comment --><style type="text/css">body {} </style><script type="text/javascript></script>`,
37+
)
3638
expect(() => getByLabelText('LucyRicardo'))
3739
.toThrowErrorMatchingInlineSnapshot(`
3840
"Unable to find a label with the text of: LucyRicardo

0 commit comments

Comments
 (0)