Skip to content

Commit 55ca1b1

Browse files
user-event: add shift-tab example (#1464)
1 parent 4371086 commit 55ca1b1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/user-event/api-convenience.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,9 @@ test('tab', async () => {
191191
// cycle goes back to the body element
192192
expect(document.body).toHaveFocus()
193193

194-
await user.tab()
194+
// simulate Shift-Tab
195+
await user.tab({shift: true})
195196

196-
expect(checkbox).toHaveFocus()
197+
expect(number).toHaveFocus()
197198
})
198199
```

0 commit comments

Comments
 (0)