Skip to content

added vitest setup - #476

Merged
Jaydbrown merged 1 commit into
conduit-protocol:mainfrom
blockchainrafik:main
Aug 26, 2026
Merged

added vitest setup#476
Jaydbrown merged 1 commit into
conduit-protocol:mainfrom
blockchainrafik:main

Conversation

@blockchainrafik

Copy link
Copy Markdown

Based on my full audit of the codebase, here's the PR description:


chore: migrate from Jest to Vitest

Summary

Replaces Jest with Vitest as the test runner across the monorepo, eliminating the need for Babel/ts-jest transforms and aligning the test toolchain with the existing Vite/Rollup build pipeline.

Changes

  • Installed vitest and @vitest/coverage-v8 as dev dependencies; removed Jest and ts-jest
  • Replaced jest.config.js with vitest.config.ts — configures globals: true, environment: node, coverage via v8, and the correct include globs for src/tests/** and tests/**
  • Updated packages/react/vitest.config.ts — sets environment: jsdom, points setupFiles at src/__tests__/setup.ts which imports @testing-library/jest-dom/vitest
  • Migrated all test files — replaced import { jest } from '@jest/globals' with import { vi, ... } from 'vitest'; updated all jest.fn()vi.fn(), jest.spyOn()vi.spyOn(), jest.mock()vi.mock(), etc.
  • Updated package.json scripts: "test": "vitest run", "test:watch": "vitest"
  • Updated CI pipeline — test job now runs npx vitest --run; @streamfi/react job also runs npx vitest --run

Motivation

Jest requires ts-jest and Babel transforms to handle modern ESM and TypeScript in this project. Vitest runs natively with the same Vite config, has a near-identical API (vi mirrors jest), and is significantly faster in both single-run and watch modes.

Test Results

Test Files  57 passed | 1 skipped (58)
     Tests  722 passed | 2 skipped (724)
  Duration  ~42s

Closes #343

@drips-wave

drips-wave Bot commented Aug 25, 2026

Copy link
Copy Markdown

@blockchainrafik Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Jaydbrown

Copy link
Copy Markdown
Contributor

Thanks for the contribution here — squash-merging this now. Any follow-ups we'll track in a fresh issue. 🚀

@Jaydbrown
Jaydbrown merged commit 352666c into conduit-protocol:main Aug 26, 2026
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.

Chore: Migrate from Jest to Vitest

2 participants