Skip to content

Migrate vitest from jest#38

Merged
dionshihk merged 9 commits into
neowu:masterfrom
anthonylee1994:master
Mar 3, 2026
Merged

Migrate vitest from jest#38
dionshihk merged 9 commits into
neowu:masterfrom
anthonylee1994:master

Conversation

@anthonylee1994

Copy link
Copy Markdown
Contributor

No description provided.

- Replace Jest configuration with Vitest configuration
- Update test files to use Vitest globals (vi instead of jest)
- Remove Jest dependencies and add Vitest dependency
- Update test runner command in package.json
- Adjust test utilities to use Vitest's timer mocking
- Move vitest config from root to config/vitest.config.ts for better organization
- Remove @reduxjs/toolkit dependency as it's no longer used in tests
- Update test to use redux directly instead of redux toolkit
- Clean up package.json and lock file accordingly
Update import in test file to use Redux Toolkit's legacy_createStore
alias to maintain compatibility while addressing deprecation warnings
Include source directory TypeScript files to ensure proper type checking during test compilation.
Delete the top-level vitest.config.js file as it only re-exports the config from the config directory. Update the test script to directly reference the config file.

Remove unused testing dependencies (@testing-library/dom and @testing-library/user-event) from package.json and pnpm-lock.yaml.
Update the @types/node dependency to the latest version to incorporate the latest TypeScript definitions for Node.js, ensuring compatibility and access to new type features. The lock file has been regenerated accordingly.
The test tsconfig reference is removed from the main tsconfig.json as it is no longer needed. The test tsconfig now explicitly includes all test files and source files, ensuring proper compilation for tests without project references.
The jsdom package was removed as it is no longer needed for testing or development.
This reduces the dependency footprint and lockfile complexity.
@dionshihk

Copy link
Copy Markdown
Collaborator

Thanks for the PR, I will merge

@dionshihk dionshihk merged commit 7b0b8f4 into neowu:master Mar 3, 2026
1 check 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