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

Use Vitest browser to test react-admin #10479

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Use Vitest browser to test react-admin #10479

wants to merge 2 commits into from

Conversation

djhi
Copy link
Collaborator

@djhi djhi commented Jan 27, 2025

Problem

  • Jest is slow
  • Jest is unreliable (bundling issues, performances, etc.)
  • JSDom has many differences from a real browser
  • JSDom is incomplete
  • We use vite already

Solution

Use Vitest browser to test react-admin

  1. Replace jest calls with vitest equivalents
  2. Replace testing-library calls with vitest equivalents (https://vitest.dev/guide/browser/interactivity-api.html)
  3. Cleanup test output (probably linked to 2
  4. Update vite dependencies across the monorepo

How To Test

Run the usual test commands

Additional Checks

  • The PR targets master for a bugfix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
evan-a-a Evan Anderson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work In Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant