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 e060b8f commit 6198fd2Copy full SHA for 6198fd2
1 file changed
test/browser/fixtures/user-event/wheel.test.ts
@@ -55,7 +55,9 @@ describe.for([
55
56
await (testType === 'userEvent' ? userEvent.wheel(selector, options) : selector.wheel(options))
57
58
- expect(wheel).toHaveBeenCalledOnce()
+ // the wheel event is dispatched asynchronously in the browser, so poll for
59
+ // it instead of asserting synchronously (matches the default-delta case above)
60
+ await expect.poll(() => wheel).toHaveBeenCalledOnce()
61
expect(wheel.mock.calls[0][0].deltaX).toBe(deltaX)
62
expect(wheel.mock.calls[0][0].deltaY).toBe(deltaY)
63
})
0 commit comments