Skip to content

Commit 821c059

Browse files
Prefer user.clear() to reset value
1 parent a0924cd commit 821c059

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/nhsuk-frontend/src/nhsuk/components/stepper-input/stepper-input.jsdom.test.mjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,7 @@ describe('Stepper input', () => {
211211
})
212212

213213
it('steps up from 1 if the input is empty and min is 0', async () => {
214-
$input.value = ''
215-
214+
await user.clear($input)
216215
await user.click($stepUpButton)
217216

218217
expect($input).toHaveValue(1)
@@ -233,8 +232,7 @@ describe('Stepper input', () => {
233232
})
234233

235234
it('steps down to min value if the input is empty', async () => {
236-
$input.value = ''
237-
235+
await user.clear($input)
238236
await user.click($stepDownButton)
239237

240238
expect($input).toHaveValue(0)

0 commit comments

Comments
 (0)