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

test: convert all tests to Vitest browser mode #706

Merged
merged 7 commits into from
Nov 12, 2024

Conversation

thebuilder
Copy link
Owner

This replaces the JSDom approach with Playwright.

  • Run all tests in Browser mode
  • Switch global to window in test-utils.ts. This is needed for the file to be loaded correctly in a browser.

Might make sense to create another test that validates that the act() approach is still working.

This replaces the JSDom approach with Playwright
Copy link

stackblitz bot commented Oct 31, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

vercel bot commented Oct 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-intersection-observer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 12, 2024 3:16pm

Copy link

pkg-pr-new bot commented Oct 31, 2024

pnpm add https://pkg.pr.new/thebuilder/react-intersection-observer@706

commit: b1efa00

@thebuilder
Copy link
Owner Author

Hm - So the new vitest-browser-react uses the React 18 react-dom/client to render content. This breaks the old matrix tests, since they rely on react-dom 16 and 17.

@thebuilder thebuilder merged commit 18bd2bd into main Nov 12, 2024
17 checks passed
@thebuilder thebuilder deleted the feat/upgrade-to-vitest-browser branch November 12, 2024 15:36
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