Skip to content

Commit b08dbfe

Browse files
committed
failing test
1 parent 180179e commit b08dbfe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/__tests__/act.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ test('render calls useEffect immediately', () => {
1414
expect(effectCb).toHaveBeenCalledTimes(1)
1515
})
1616

17+
test('findByTestId returns the element', async () => {
18+
const ref = React.createRef()
19+
const {findByTestId, getByTestId} = render(
20+
<div ref={ref} data-testid="foo" />,
21+
)
22+
await expect(findByTestId('foo')).resolves.toEqual(getByTestId('foo'))
23+
})
24+
1725
test('fireEvent triggers useEffect calls', () => {
1826
const effectCb = jest.fn()
1927
function Counter() {

0 commit comments

Comments
 (0)