Skip to content

Vitest Browser Modes input fill, type timeout #7559

Answered by hi-ogawa
akoskm asked this question in Q&A
Discussion options

You must be logged in to vote

Confusingly, aria role is textbox instead of input

- getByRole('input', { name: 'search' })
+ getByRole('textbox', { name: 'search' })

Also if you see this log, you should add optimizeDeps.include: ['react/jsx-dev-runtime']

3:19:06 PM [vite] ✨ new dependencies optimized: react/jsx-dev-runtime
3:19:06 PM [vite] ✨ optimized dependencies changed. reloading

[vitest] Vite unexpectedly reloaded a test. This may cause tests to fail, lead to flaky behaviour or duplicated test runs.
For a stable experience, please add mentioned dependencies to your config's `optimizeDeps.include` field manually.

Also I just noticed vitest is not in package.json. It works on npm, but it should be explicitly added…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hi-ogawa
Comment options

Answer selected by akoskm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants