Skip to content

chore(web): switch web app unit tests from Jest to Vitest#14

Merged
anujeet98 merged 1 commit intomainfrom
migrate-to-vitest-for-web-app
Mar 3, 2026
Merged

chore(web): switch web app unit tests from Jest to Vitest#14
anujeet98 merged 1 commit intomainfrom
migrate-to-vitest-for-web-app

Conversation

@Baba-2001
Copy link
Contributor

@Baba-2001 Baba-2001 commented Mar 3, 2026

Summary

Switch the web app unit tests from Jest to Vitest. Only the web (UI) app is affected; backend and other libs remain on Jest.

  • Add vitest.config.ts
  • Migrate route.test.ts to Vitest (vi.fn, vi.mock, vi.clearAllMocks)
  • Nx web:test target uses @nx/vitest:test with configFile
  • Exclude web from Jest plugin; add @nx/vitest plugin in nx.json
  • Update tsconfig.spec.json for Vitest; remove jest.config.cts

Made with Cursor

@Baba-2001 Baba-2001 changed the title chore(web): switch unit tests from Jest to Vitest chore(web): switch web app unit tests from Jest to Vitest Mar 3, 2026
- Add vitest.config.ts with node env and @/ alias
- Migrate route.test.ts to Vitest (vi.fn, vi.mock, vi.clearAllMocks)
- Point Nx test target to @nx/vitest:test with configFile
- Exclude web from Jest plugin in nx.json; add @nx/vitest plugin
- Update tsconfig.spec.json for Vitest types and outDir
- Remove jest.config.cts and Jest refs from tsconfig.json

Made-with: Cursor
@Baba-2001 Baba-2001 force-pushed the migrate-to-vitest-for-web-app branch from a7bc1d1 to 151e3d1 Compare March 3, 2026 11:46
@anujeet98 anujeet98 merged commit 2be0a0b into main Mar 3, 2026
1 check passed
@anujeet98 anujeet98 deleted the migrate-to-vitest-for-web-app branch March 3, 2026 12:45
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