We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c50c0bb commit 66f2206Copy full SHA for 66f2206
src/__tests__/to-have-focus.js
@@ -1,4 +1,5 @@
1
import {render} from './helpers/test-utils'
2
+import document from './helpers/document'
3
4
test('.toHaveFocus', () => {
5
const {container} = render(`
@@ -11,6 +12,7 @@ test('.toHaveFocus', () => {
11
12
const focused = container.querySelector('#focused')
13
const notFocused = container.querySelector('#not-focused')
14
15
+ document.body.appendChild(container)
16
focused.focus()
17
18
expect(focused).toHaveFocus()
0 commit comments