Skip to content

Commit

Permalink
test: replaced jest with vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
surmon-china committed Aug 14, 2024
1 parent 5ac6584 commit ae561f0
Show file tree
Hide file tree
Showing 19 changed files with 1,535 additions and 2,089 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: pnpm install

- name: Test
run: pnpm run test
run: pnpm run coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file.

- Refactored `watch`, `useWatch`, `watchEffect`, and `useWatchEffect` APIs.
- Replaced `yarn` with `pnpm`.
- Replaced `jest` with `vitest`.
- Replaced `libundler` with `vite` as the bundler.
- Upgraded `React` and `react-dom` peerDependencies versions.
- Upgraded ESLint to v9.
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import prettier from 'eslint-plugin-prettier/recommended'

const globalsConfig = {
...globals.node,
...globals.jest,
...globals.browser,
}

const rules = {
Expand Down
7 changes: 0 additions & 7 deletions jest.config.js

This file was deleted.

15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@
},
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint src",
"format": "prettier --write --parser typescript \"src/**/*.ts\"",
"test": "jest",
"build": "vite build",
"test": "vitest",
"coverage": "vitest run --coverage",
"ci": "npm run lint && npm run test && npm run build",
"release": ". ./scripts/release.sh"
},
Expand All @@ -50,24 +51,24 @@
},
"devDependencies": {
"@eslint/js": "^9.x",
"@testing-library/react-hooks": "^7.0.2",
"@testing-library/react": "^16.x",
"@types/eslint": "^9.x",
"@types/jest": "^27.4.0",
"@types/react": "^18.x",
"@types/react-dom": "^18.x",
"@vitejs/plugin-react": "^4.3.1",
"@vitest/coverage-v8": "^2.0.5",
"eslint": "^9.x",
"eslint-config-prettier": "^9.x",
"eslint-plugin-prettier": "^5.x",
"globals": "^15.9.0",
"jest": "^29.x",
"jsdom": "^24.x",
"prettier": "^3.x",
"react": "^18.x",
"react-dom": "^18.x",
"ts-jest": "^29.x",
"typescript": "^5.5.4",
"typescript-eslint": "^8.x",
"vite": "^5.4.0",
"vite-plugin-dts": "^4.0.2"
"vite-plugin-dts": "^4.0.2",
"vitest": "^2.x"
}
}
Loading

0 comments on commit ae561f0

Please sign in to comment.