Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNM/PoC move to vitest-browser-react #1468

Closed

Conversation

goneri
Copy link
Contributor

@goneri goneri commented Dec 19, 2024

No description provided.

Right now, our tests are failing due to some problem with `happy-dom`, the fake webbrowser
used to run the tests by `react-testing-library`. `jsdom` is an alternative but we cannot
use it without adjusting our tests and facing similar issues or limitations.

By moving to `vitest-browser-react`, we are now able to run the tests against a real browser
like Chrome or Firefox. We still have the option to run the tests "headless" for a CI environment.

`vitest-browser-react` is directly based on `vitest-browser` and allow us to stay in a standard
`vite` ecosystem. It also reuses some elements from `react-testing-library`, which explains why
the PR is not that large.

Overall, this change reduces the differences between our tests and the production environment,
and allow use to limit our exposure to the limitations of these dummy browser implementations.
@goneri goneri force-pushed the goneri/DNM-PoC-move-to-vitest-browser-react_22109 branch from 995b7ca to 3633e05 Compare December 19, 2024 21:09
@goneri goneri closed this Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant