Skip to content

chore: use vitest 😼 - #580

Merged
gabrielmfern merged 9 commits into
canaryfrom
chore/use-vitest-😼
Aug 21, 2025

Hidden character warning

The head ref may contain hidden characters: "chore/use-vitest-\ud83d\ude3c"
Merged

gabrielmfern merged 9 commits into
canaryfrom
chore/use-vitest-😼

Conversation

@gabrielmfern

@gabrielmfern gabrielmfern commented Aug 21, 2025 •

Copy link
Copy Markdown
Member

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

socket-security Bot commented Aug 21, 2025 •

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown
Contributor

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
@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.

2 participants