mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
chore(test): separate client & server tests
This commit is contained in:
parent
909a74e8ac
commit
ef736edf09
23
package-lock.json
generated
23
package-lock.json
generated
@ -49,6 +49,7 @@
|
||||
"express-session": "1.18.1",
|
||||
"force-graph": "1.49.0",
|
||||
"fs-extra": "11.3.0",
|
||||
"happy-dom": "17.1.8",
|
||||
"helmet": "8.0.0",
|
||||
"html": "1.0.0",
|
||||
"html2plaintext": "2.1.4",
|
||||
@ -10883,6 +10884,28 @@
|
||||
"integrity": "sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/happy-dom": {
|
||||
"version": "17.1.8",
|
||||
"resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-17.1.8.tgz",
|
||||
"integrity": "sha512-Yxbq/FG79z1rhAf/iB6YM8wO2JB/JDQBy99RiLSs+2siEAi5J05x9eW1nnASHZJbpldjJE2KuFLsLZ+AzX/IxA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"webidl-conversions": "^7.0.0",
|
||||
"whatwg-mimetype": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/happy-dom/node_modules/whatwg-mimetype": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz",
|
||||
"integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
|
@ -44,7 +44,9 @@
|
||||
"docs:build": "npm run docs:build-backend && npm run docs:build-frontend",
|
||||
"build:webpack": "tsx node_modules/webpack/bin/webpack.js -c webpack.config.ts",
|
||||
"build:prepare-dist": "npm run build:webpack && rimraf ./dist && tsc && tsx ./bin/copy-dist.ts",
|
||||
"test": "cross-env TRILIUM_DATA_DIR=./integration-tests/db TRILIUM_INTEGRATION_TEST=memory vitest",
|
||||
"test": "npm run test:server && npm run test:client",
|
||||
"test:server": "cross-env TRILIUM_DATA_DIR=./integration-tests/db TRILIUM_INTEGRATION_TEST=memory vitest",
|
||||
"test:client": "cross-env TRILIUM_DATA_DIR=./integration-tests/db TRILIUM_INTEGRATION_TEST=memory vitest --root src/public/app",
|
||||
"test:coverage": "cross-env TRILIUM_DATA_DIR=./integration-tests/db vitest --coverage",
|
||||
"test:playwright": "playwright test",
|
||||
"test:integration-edit-db": "cross-env TRILIUM_INTEGRATION_TEST=edit TRILIUM_PORT=8081 TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db nodemon src/main.ts",
|
||||
@ -99,6 +101,7 @@
|
||||
"express-session": "1.18.1",
|
||||
"force-graph": "1.49.0",
|
||||
"fs-extra": "11.3.0",
|
||||
"happy-dom": "17.1.8",
|
||||
"helmet": "8.0.0",
|
||||
"html": "1.0.0",
|
||||
"html2plaintext": "2.1.4",
|
||||
|
7
src/public/app/vitest.config.ts
Normal file
7
src/public/app/vitest.config.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { defineConfig } from "vitest/config";
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
environment: "happy-dom"
|
||||
}
|
||||
});
|
@ -8,6 +8,7 @@ const customExcludes = [
|
||||
"tests-examples/**",
|
||||
"node_modules/**",
|
||||
"src/public/app-dist/**",
|
||||
"src/public/app/**",
|
||||
"libraries/**",
|
||||
"docs/**",
|
||||
"out/**",
|
||||
|
Loading…
x
Reference in New Issue
Block a user