chore: 为多个package.json添加test:unit脚本并更新全局测试命令

在多个库和插件的package.json中添加统一的test:unit脚本
同时在根package.json中添加全局test:unit命令以并行运行所有子项目的单元测试
This commit is contained in:
xiaojunnuo
2026-05-01 09:25:53 +08:00
parent 0a0f1e90e1
commit 7c1d92ff4b
9 changed files with 12 additions and 3 deletions
+3 -2
View File
@@ -25,8 +25,8 @@
"commitAll": "git add . && git commit -m \"build: publish\" && git push && pnpm run commitPro",
"commitPro": "cd ./packages/pro/ && git add . && git commit -m \"build: publish\" && git push",
"copylogs": "copyfiles \"CHANGELOG.md\" ./docs/guide/changelogs/",
"prepublishOnly1": "pnpm run check && lerna run build ",
"prepublishOnly2": "pnpm run check && pnpm run before-build && lerna run build && pnpm run plugin-doc-gen",
"prepublishOnly1": "pnpm run test:unit && pnpm run check && lerna run build ",
"prepublishOnly2": "pnpm run test:unit && pnpm run check && pnpm run before-build && lerna run build && pnpm run plugin-doc-gen",
"before-build": "pnpm run transform-sql && cd ./packages/core/basic && time /t >build.md && git add ./build.md && git commit -m \"build: prepare to build\"",
"deploy1": "node --experimental-json-modules ./scripts/deploy.js ",
"check": "node --experimental-json-modules ./scripts/publish-check.js",
@@ -35,6 +35,7 @@
"docs:dev": "vitepress dev docs",
"docs:build": "pnpm run copylogs && vitepress build docs",
"docs:preview": "vitepress preview docs",
"test:unit": "pnpm -r --workspace-concurrency=1 run test:unit",
"pub": "echo 1",
"dev": "pnpm run -r --parallel compile ",
"pub_all":"pnpm run -r --parallel pub ",
+1
View File
@@ -52,6 +52,7 @@
"lint-types": "tsd",
"prepublishOnly": "npm run build-docs",
"test": "mocha -t 60000 \"test/setup.js\" \"test/**/*.spec.js\"",
"test:unit": "echo no unit tests",
"pub": "npm publish",
"compile": "echo '1'"
},
+1
View File
@@ -11,6 +11,7 @@
"build": "npm run before-build && rollup -c ",
"dev-build": "npm run build",
"preview": "vite preview",
"test:unit": "echo no unit tests",
"pub": "npm publish"
},
"dependencies": {
+1
View File
@@ -14,6 +14,7 @@
"build3": "rollup -c",
"build2": "vue-tsc --noEmit && vite build",
"preview": "vite preview",
"test:unit": "echo no unit tests",
"pub": "npm publish"
},
"dependencies": {
+1
View File
@@ -8,6 +8,7 @@
"scripts": {
"build": "rollup -c ",
"dev-build": "npm run build",
"test:unit": "echo no unit tests",
"pub": "npm publish"
},
"author": "",
+1
View File
@@ -14,6 +14,7 @@
"build3": "rollup -c",
"build2": "vue-tsc --noEmit && vite build",
"preview": "vite preview",
"test:unit": "echo no unit tests",
"pub": "npm publish",
"compile": "tsc --skipLibCheck --watch"
},
@@ -13,6 +13,7 @@
"dev-build": "npm run build",
"test": "midway-bin test --ts -V",
"test1": "midway-bin test --ts -V -f test/blank.test.ts -t 'hash-check'",
"test:unit": "echo no unit tests",
"cov": "midway-bin cov --ts",
"prepublish": "npm run build",
"pub": "npm publish"
@@ -13,6 +13,7 @@
"build3": "rollup -c",
"build2": "vue-tsc --noEmit && vite build",
"preview": "vite preview",
"test:unit": "echo no unit tests",
"pub": "npm publish",
"compile": "tsc --skipLibCheck --watch"
},
+2 -1
View File
@@ -12,7 +12,8 @@
"debug:force": "vite --force --mode debug",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=40960 vite build ",
"dev-build": "echo 1",
"test:unit": "vitest",
"test:unit": "echo no unit tests",
"test:vue": "vitest run",
"serve": "vite preview",
"preview": "vite preview",
"pretty-quick": "pretty-quick",