-
Notifications
You must be signed in to change notification settings - Fork 410
Closed
Labels
Description
@testing-library/jest-dom
version: 4.1.2node
version: 12.6.0npm
(oryarn
) version: 6.11.3
Relevant code or config:
...
What you did:
npm run setup
What happened:
[test]
FAIL src/__tests__/to-have-focus.js
● .toHaveFocus
[test]
expect(element).toHaveFocus()
[test]
Expected
<input id="focused" type="text" />
[test] Received:
null
[test]
14 | focused.focus()
15 |
> 16 | expect(focused).toHaveFocus()
| ^
17 | expect(notFocused).not.toHaveFocus()
18 |
19 | expect(() => expect(focused).not.toHaveFocus()).toThrowError()
at Object.toHaveFocus (src/__tests__/to-have-focus.js:16:19)
[test]
[test]
[test] Test Suites: 2 failed, 32 passed, 34 total
[test] Tests: 2 failed, 126 passed, 128 total
[test] Snapshots: 8 passed, 8 total