Skip to content

Commit

Permalink
chore: migrate jest to vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed Sep 5, 2023
1 parent a6aa0db commit 8920e0b
Show file tree
Hide file tree
Showing 94 changed files with 1,429 additions and 2,079 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = {
extends: [require.resolve('@umijs/fabric/dist/eslint')],
rules: {
"@typescript-eslint/consistent-type-imports": "off",
}
};
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ _roadhog-api-doc
.DS_Store
npm-debug.log*
yarn-error.log
.jest
jest/**
/coverage
.idea
package-lock.json
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/intro.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ When we clone the project we will see the following directory structure.
- .fatherrc.ts * configuration for compile scaffolding
- .umirc.js * core configuration for dumi
- webpack.config.js * configuration file for compiling the umd package
- jest.config.js * configuration for the test environment
- vitest.config.js * configuration for the test environment
- lerna.json * configuration for multiple packages
- package.json * configuration for the project
- tsconfig.json * configuration for typescript
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Ant Design 定义了基础的设计规范,对应也提供了大量的基础组
- .fatherrc.ts * 编译脚手架的配置
- .umirc.js * dumi 的核心配置
- webpack.config.js * 编译 umd 包的配置文件
- jest.config.js * 测试环境的配置
- vitest.config.js * 测试环境的配置
- lerna.json * 多包的配置
- package.json * 项目的配置
- tsconfig.json * typescript 的配置
Expand Down
45 changes: 0 additions & 45 deletions jest.config.ts

This file was deleted.

17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"site": "npm run build && cross-env SITE_DEPLOY='TRUE' dumi build",
"start": "npm run version && dumi dev",
"sync:tnpm": "node -e 'require(\"./scripts/syncTNPM\")()'",
"test": "npm run version && cross-env TZ=UTC jest ",
"test:coverage": "npm run version && cross-env TZ=UTC TEST_LOG=none jest --coverage",
"test:update": "pnpm run version && cross-env TZ=UTC jest --updateSnapshot",
"test": "npm run version && cross-env TZ=UTC vitest ",
"test:coverage": "npm run version && cross-env TZ=UTC TEST_LOG=none vitest --coverage",
"test:update": "pnpm run version && cross-env TZ=UTC vitest -u",
"tsc": "tsc --noEmit",
"tsc:duplicate": "tsc -p ./tests/tsconfig.duplicate.json",
"update:deps": "pnpm up --latest",
Expand Down Expand Up @@ -72,7 +72,6 @@
"@types/chroma-js": "^2.4.0",
"@types/glob": "^8.1.0",
"@types/history": "^4.7.11",
"@types/jest": "^27.5.2",
"@types/lodash": "^4.14.197",
"@types/lodash.merge": "^4.6.7",
"@types/mockjs": "^1.0.7",
Expand All @@ -90,6 +89,7 @@
"@umijs/test": "^3.5.41",
"@umijs/test-utils": "^3.5.41",
"@umijs/utils": "^4.0.79",
"@vitest/coverage-istanbul": "^0.34.3",
"animated-scroll-to": "^2.3.0",
"antd": "^5.8.5",
"antd-style": "^3.4.4",
Expand All @@ -103,9 +103,7 @@
"dumi": "^2.2.7",
"dumi-theme-antd-style": "0.25.1",
"esbuild": "^0.15.18",
"esbuild-jest": "^0.5.0",
"eslint": "^8.48.0",
"eslint-plugin-jest": "^27.2.3",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-unicorn": "^47.0.0",
Expand All @@ -117,9 +115,7 @@
"glob": "^8.1.0",
"identity-obj-proxy": "^3.0.0",
"inquirer": "^8.2.6",
"jest": "^29.6.4",
"jest-canvas-mock": "^2.5.2",
"jest-environment-jsdom": "^29.6.4",
"jest-fetch-mock": "^3.0.3",
"jsdom": "^19.0.0",
"lerna": "^3.22.1",
Expand Down Expand Up @@ -169,5 +165,8 @@
"pre-commit": "pretty-quick --staged",
"commit-msg": "fabric verify-commit"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"dependencies": {
"vitest": "^0.34.3"
}
}
Loading

0 comments on commit 8920e0b

Please sign in to comment.