Conversation
Co-authored-by: jomzxc <74537369+jomzxc@users.noreply.github.com>
Co-authored-by: jomzxc <74537369+jomzxc@users.noreply.github.com>
Co-authored-by: jomzxc <74537369+jomzxc@users.noreply.github.com>
Co-authored-by: jomzxc <74537369+jomzxc@users.noreply.github.com>
Co-authored-by: jomzxc <74537369+jomzxc@users.noreply.github.com>
Co-authored-by: jomzxc <74537369+jomzxc@users.noreply.github.com>
…rategy Add comprehensive automated testing infrastructure with unit and E2E tests
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive testing infrastructure for the WebDrop application, including both unit tests (Vitest) and end-to-end tests (Playwright). The changes introduce test configuration files, test utilities, and test suites covering authentication, room management, file transfers, UI components, and utility functions.
Key Changes:
- Added Vitest and Playwright test configurations
- Implemented E2E tests for authentication, room management, file transfers, profile management, and UI
- Created unit tests for utility functions, file transfer manager, and React components
- Set up test fixtures and helper utilities including testmail.app integration for email testing
Reviewed Changes
Copilot reviewed 20 out of 23 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
vitest.config.ts |
Vitest configuration with jsdom environment and coverage settings |
tests/setup.ts |
Test setup with mocks and polyfills - contains duplicate router mock |
tests/utils/polyfills.ts |
Blob polyfill for jsdom environment |
tests/utils/testmail.helper.ts |
Email testing utilities using testmail.app |
tests/global.setup.ts |
Global test setup for creating authenticated users |
tests/*.spec.ts |
Playwright E2E test suites |
tests/unit/**/*.test.ts |
Vitest unit test suites |
.gitignore |
Added test output directories |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Mock Next.js router | ||
| vi.mock('next/navigation', () => ({ | ||
| useRouter: () => ({ | ||
| push: vi.fn(), | ||
| replace: vi.fn(), | ||
| prefetch: vi.fn(), | ||
| back: vi.fn(), | ||
| }), | ||
| usePathname: () => '/', | ||
| useSearchParams: () => new URLSearchParams(), | ||
| })) |
There was a problem hiding this comment.
The Next.js router mock is duplicated twice (lines 23-33 and 36-46). Remove one of the duplicate blocks to avoid confusion and maintain cleaner code.
| // Mock Next.js router | |
| vi.mock('next/navigation', () => ({ | |
| useRouter: () => ({ | |
| push: vi.fn(), | |
| replace: vi.fn(), | |
| prefetch: vi.fn(), | |
| back: vi.fn(), | |
| }), | |
| usePathname: () => '/', | |
| useSearchParams: () => new URLSearchParams(), | |
| })) |
No description provided.