Skip to content

Conversation

@gabrielmfern
Copy link
Member

@gabrielmfern gabrielmfern commented Aug 21, 2025

Replaces jest with vitest, and uses vitest-fetch-mock instead of jest-fetch-mock


Summary by cubic

Switch the test suite from Jest to Vitest for faster runs and simpler setup. Replaces jest-fetch-mock with vitest-fetch-mock and updates configs and scripts.

  • Refactors

    • Added vitest.config.ts (globals, node env, clear/restore mocks, setupFiles) and src/test/setup.ts to enable fetch mocks via vitest.
    • Removed jest.config.ts and jest.setup.ts; cleaned specs to drop enableFetchMocks and use the global fetchMock; set tsconfig types to vitest/globals.
  • Dependencies

    • Removed jest, jest-fetch-mock, and @types/jest; added vitest and vitest-fetch-mock.
    • Updated scripts: test uses "vitest run" and watch uses "vitest".

@gabrielmfern gabrielmfern requested a review from a team as a code owner August 21, 2025 17:23
@gabrielmfern gabrielmfern requested a review from Cisneiros August 21, 2025 17:23
@gabrielmfern gabrielmfern self-assigned this Aug 21, 2025
@socket-security
Copy link

socket-security bot commented Aug 21, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedvitest@​3.2.4971007798100
Updated@​types/​node@​18.19.86 ⏵ 20.19.11100 +110080 +196100
Addedvitest-fetch-mock@​0.4.510010010081100

View full report

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 14 files

@gabrielmfern gabrielmfern requested review from felipevolpone and removed request for Cisneiros August 21, 2025 17:32
@gabrielmfern gabrielmfern merged commit a2024a3 into canary Aug 21, 2025
9 checks passed
@gabrielmfern gabrielmfern deleted the chore/use-vitest-😼 branch August 21, 2025 18:10
@gabrielmfern gabrielmfern mentioned this pull request Aug 21, 2025
gabrielmfern added a commit that referenced this pull request Sep 15, 2025
CarolinaMoraes pushed a commit that referenced this pull request Sep 29, 2025
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.

3 participants