chore: 统一jest版本为27, 修复单元测试问题

pull/56/head
moonrailgun 2 years ago
parent 3d0398c89b
commit 3fc8f4fbdc

@ -38,9 +38,11 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Check Type
run: cd client/web && pnpm check:type
# - name: Test
# run: cd client/web && pnpm test
# env:
# TZ: Asia/Shanghai
- name: Test
run: cd client/web && pnpm test
env:
TZ: Asia/Shanghai
- name: Check Build
run: cd client/web && pnpm build:ci
env:
PERFSEE_TOKEN: ${{ secrets.PERFSEE_TOKEN }}

@ -24,11 +24,11 @@
"devDependencies": {
"@types/jest": "^28.1.0",
"@types/node": "^18.0.0",
"jest": "^26.6.3",
"jest": "27.5.1",
"nock": "^13.0.5",
"nodemon": "^2.0.18",
"smee-client": "^1.2.2",
"ts-jest": "^26.4.4",
"ts-jest": "27.1.4",
"ts-node": "^10.9.1",
"typescript": "^4.1.3"
},

@ -175,8 +175,8 @@
"html-webpack-plugin": "^5.5.0",
"https-browserify": "^1.0.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^28.1.0",
"jest-environment-jsdom": "^28.1.0",
"jest": "27.5.1",
"jest-environment-jsdom": "27.5.1",
"less": "^4.1.3",
"less-loader": "^10.0.0",
"lint-staged": "^12.4.1",
@ -194,7 +194,7 @@
"style-loader": "^3.3.1",
"tailwindcss": "^2.2.4",
"terser-webpack-plugin": "^5.3.1",
"ts-jest": "^28.0.2",
"ts-jest": "27.1.4",
"ts-loader": "^9.3.0",
"ts-node": "^10.7.0",
"typescript": "^4.6.4",

@ -69,9 +69,9 @@
},
"devDependencies": {
"@perfsee/webpack": "1.0.0-alpha.4",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.0.0",
"@testing-library/react-hooks": "^7.0.1",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/react-hooks": "^8.0.1",
"@types/copy-webpack-plugin": "^8.0.0",
"@types/dts-generator": "^2.1.6",
"@types/emoji-mart": "^3.0.8",
@ -111,8 +111,8 @@
"glob": "^7.2.0",
"html-webpack-plugin": "^5.3.2",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.2.1",
"jest-environment-jsdom": "^29.2.1",
"jest": "27.5.1",
"jest-environment-jsdom": "27.5.1",
"less": "^4.1.1",
"less-loader": "^10.0.0",
"mini-css-extract-plugin": "^1.6.2",
@ -126,7 +126,7 @@
"source-ref-loader": "^1.0.7",
"style-loader": "^3.0.0",
"tailchat-plugin-declaration-generator": "workspace:^1.0.0",
"ts-jest": "^29.0.3",
"ts-jest": "27.1.4",
"ts-node": "^10.0.0",
"tsconfig-paths": "^3.9.0",
"tsconfig-paths-webpack-plugin": "^3.5.1",

@ -2,8 +2,10 @@ const path = require('path');
module.exports = {
process(src, filename, config, options) {
return {
code: 'module.exports = ' + JSON.stringify(path.basename(filename)) + ';',
};
const code =
'module.exports = ' + JSON.stringify(path.basename(filename)) + ';';
// return { code };
return code;
},
};

File diff suppressed because it is too large Load Diff

@ -97,7 +97,7 @@
"gulp-sort": "^2.0.0",
"i18next-scanner": "^3.0.0",
"inquirer": "^8.2.2",
"jest": "^27.0.6",
"jest": "27.5.1",
"mini-star": "^1.2.8",
"moleculer": "0.14.23",
"moleculer-cli": "^0.7.1",
@ -105,7 +105,7 @@
"ora": "5",
"prettier": "^2.3.2",
"socket.io-client": "^4.1.3",
"ts-jest": "^27.0.3",
"ts-jest": "27.1.4",
"vinyl-fs": "^3.0.3"
},
"peerDependencies": {

Loading…
Cancel
Save