Skip to content

Conversation

@jtomaszewski
Copy link

Summary

  • Migrate core package from Jest to Vitest for test framework consistency
  • Replace jest.fn() with vi.fn() in all mock utilities
  • Update fake timers and type assertions to use Vitest APIs
  • Exclude test directories from TypeScript build in both packages

Motivation

The monorepo previously used inconsistent test frameworks:

  • Core package: Jest
  • MikroORM driver: Vitest

This inconsistency caused developer confusion and made it harder to maintain shared test patterns.

Changes

File Change
packages/core/package.json Replace Jest deps with Vitest
packages/core/vitest.config.ts New config (matches mikroorm-driver)
packages/core/jest.config.js Deleted
packages/core/src/test/unit/mock/*.ts jest.fn()vi.fn()
packages/core/src/test/unit/*.spec.ts Update to Vitest APIs
packages/*/tsconfig.json Exclude src/test from build

Test plan

  • All 23 core package tests pass
  • Build succeeds after excluding test files

🤖 Generated with Claude Code

@jtomaszewski jtomaszewski force-pushed the vk/6cf5-standardize-test branch from fd10205 to 88d510a Compare December 3, 2025 10:41
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 3, 2025

Open in StackBlitz

npm i https://pkg.pr.new/fullstackhouse/nestjs-inbox-outbox/@nestixis/nestjs-inbox-outbox@13
npm i https://pkg.pr.new/fullstackhouse/nestjs-inbox-outbox/@nestixis/nestjs-inbox-outbox-mikroorm-driver@13
npm i https://pkg.pr.new/fullstackhouse/nestjs-inbox-outbox/@nestixis/nestjs-inbox-outbox-typeorm-driver@13

commit: cc964af

@jtomaszewski jtomaszewski force-pushed the vk/6cf5-standardize-test branch 2 times, most recently from a2553dc to b07d3f0 Compare December 3, 2025 10:53
- Migrate core package from Jest to Vitest
- Replace jest.fn() with vi.fn() in all mock files
- Replace jest.useFakeTimers/advanceTimersByTime with vi equivalents
- Add vitest.config.ts to core package (matches mikroorm-driver config)
- Remove jest.config.js and Jest dependencies
- Exclude test directories from tsconfig.json build in both packages

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jtomaszewski jtomaszewski force-pushed the vk/6cf5-standardize-test branch from b07d3f0 to cc964af Compare December 3, 2025 11:01
@jtomaszewski jtomaszewski merged commit 4fe5e81 into main Dec 3, 2025
5 checks passed
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