Skip to content

Conversation

@darthmaim
Copy link
Member

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the testing infrastructure from jsdom-based testing with @testing-library/react to Vitest's browser mode using Playwright and vitest-browser-react. This enables running tests in a real browser environment instead of a simulated DOM.

  • Removes @testing-library/react, @testing-library/dom, and jsdom dependencies
  • Adds @vitest/browser-playwright, vitest-browser-react, and Playwright for browser-based testing
  • Updates test files to use async/await pattern required by browser-based testing
  • Adds browser environment setup including process.env polyfill for Next.js internals

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pnpm-lock.yaml Updates dependencies: removes testing-library packages and jsdom, adds vitest browser packages and playwright; marks jsdom dependencies as optional
apps/web/vitest.config.mts Replaces jsdom environment with browser mode configuration using Playwright provider
apps/web/package.json Updates devDependencies to remove testing-library packages and add vitest browser packages
apps/web/lib/use-stable-array.test.ts Converts tests to async/await, updates import from @testing-library/react to vitest-browser-react, adds non-null assertions for renderHook parameters
apps/web/lib/next.mock.ts Adds browser environment polyfills for server-only mock and process.env for Next.js internals
apps/web/components/Time/countdown.test.tsx Converts tests to async/await, updates import to vitest-browser-react, adds test case numbering for better identification
apps/web/components/Time/snapshots/countdown.test.tsx.snap Updates snapshots with new test names, different CSS class hashes, and removes trailing commas from fragments
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@darthmaim darthmaim force-pushed the feature/vitest-browser branch 3 times, most recently from d6836e8 to 41c3680 Compare January 4, 2026 18:58
@darthmaim darthmaim force-pushed the feature/vitest-browser branch from 41c3680 to 83a6a05 Compare January 4, 2026 19:03
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.

2 participants