@nocobase/test 2.1.0-alpha.24 → 2.1.0-alpha.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/vitest.mjs +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/test",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.26",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "./src/index.ts",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@faker-js/faker": "8.1.0",
|
|
54
|
-
"@nocobase/server": "2.1.0-alpha.
|
|
55
|
-
"@nocobase/utils": "2.1.0-alpha.
|
|
54
|
+
"@nocobase/server": "2.1.0-alpha.26",
|
|
55
|
+
"@nocobase/utils": "2.1.0-alpha.26",
|
|
56
56
|
"@playwright/test": "^1.45.3",
|
|
57
57
|
"@testing-library/jest-dom": "^6.4.2",
|
|
58
58
|
"@testing-library/react": "^14.0.0",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"vitest-dom": "^0.1.1",
|
|
78
78
|
"ws": "^8.13.0"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "e6e6518030175b58080218bb4357642398bcb54a"
|
|
81
81
|
}
|
package/vitest.mjs
CHANGED
|
@@ -10,6 +10,7 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
10
10
|
const __dirname = dirname(__filename);
|
|
11
11
|
|
|
12
12
|
const CORE_CLIENT_PACKAGES = ['sdk', 'client', 'client-v2', 'flow-engine'];
|
|
13
|
+
const PLUGIN_CLIENT_PACKAGES = ['client', 'client-v2'];
|
|
13
14
|
// 按路径填写要跳过服务端测试的插件目录(相对仓库根目录)
|
|
14
15
|
const skipPluginPaths = [
|
|
15
16
|
'packages/plugins/@nocobase/plugin-audit-logs',
|
|
@@ -114,7 +115,7 @@ const defineCommonConfig = () => {
|
|
|
114
115
|
function getExclude(isServer) {
|
|
115
116
|
return [
|
|
116
117
|
`packages/core/${isServer ? '' : '!'}(${CORE_CLIENT_PACKAGES.join('|')})/**/*`,
|
|
117
|
-
|
|
118
|
+
...(isServer ? PLUGIN_CLIENT_PACKAGES : ['server']).map((dir) => `packages/**/src/${dir}/**/*`),
|
|
118
119
|
];
|
|
119
120
|
}
|
|
120
121
|
|
|
@@ -220,7 +221,9 @@ export const getFilterInclude = (isServer, isCoverage) => {
|
|
|
220
221
|
|
|
221
222
|
// 插件目录,区分 client 和 server
|
|
222
223
|
return {
|
|
223
|
-
include:
|
|
224
|
+
include: isServer
|
|
225
|
+
? [`${filterFileOrDir}/src/server/${suffix}`]
|
|
226
|
+
: PLUGIN_CLIENT_PACKAGES.map((dir) => `${filterFileOrDir}/src/${dir}/${suffix}`),
|
|
224
227
|
};
|
|
225
228
|
};
|
|
226
229
|
|