[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

test: poll for the async wheel event in the user-event fixture (#10732)

authored by

Vladimir and committed by
GitHub
(Jul 7, 2026, 4:12 PM +0200) 6198fd2e e060b8fa

+3 -1
+3 -1
test/browser/fixtures/user-event/wheel.test.ts
··· 55 55 56 56 await (testType === 'userEvent' ? userEvent.wheel(selector, options) : selector.wheel(options)) 57 57 58 - expect(wheel).toHaveBeenCalledOnce() 58 + // 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() 59 61 expect(wheel.mock.calls[0][0].deltaX).toBe(deltaX) 60 62 expect(wheel.mock.calls[0][0].deltaY).toBe(deltaY) 61 63 })