chore(scripts): add integration test servers to namespace "test:*"

This commit is contained in:
Panagiotis Papadopoulos 2025-02-14 08:56:45 +01:00
parent 218a889725
commit 0cace7f3f9
2 changed files with 5 additions and 4 deletions

View File

@ -53,13 +53,14 @@
"test:coverage": "cross-env TRILIUM_DATA_DIR=./data-test vitest --coverage", "test:coverage": "cross-env TRILIUM_DATA_DIR=./data-test vitest --coverage",
"test:playwright": "playwright test", "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",
"test:integration-mem-db": "cross-env TRILIUM_INTEGRATION_TEST=memory TRILIUM_PORT=8082 TRILIUM_DATA_DIR=./integration-tests/db nodemon src/main.ts",
"test:integration-mem-db-dev": "cross-env TRILIUM_INTEGRATION_TEST=memory TRILIUM_PORT=8082 TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db nodemon src/main.ts",
"dev:watch-dist": "tsx ./bin/watch-dist.ts", "dev:watch-dist": "tsx ./bin/watch-dist.ts",
"dev:prettier-check": "prettier . --check", "dev:prettier-check": "prettier . --check",
"dev:prettier-fix": "prettier . --write", "dev:prettier-fix": "prettier . --write",
"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",
"integration-mem-db": "cross-env TRILIUM_INTEGRATION_TEST=memory TRILIUM_PORT=8082 TRILIUM_DATA_DIR=./integration-tests/db nodemon src/main.ts",
"integration-mem-db-dev": "cross-env TRILIUM_INTEGRATION_TEST=memory TRILIUM_PORT=8082 TRILIUM_ENV=dev TRILIUM_DATA_DIR=./integration-tests/db nodemon src/main.ts",
"generate-document": "cross-env nodemon ./bin/generate_document.ts 1000", "generate-document": "cross-env nodemon ./bin/generate_document.ts 1000",
"generate-openapi": "node bin/generate-openapi.js", "generate-openapi": "node bin/generate-openapi.js",
"chore:update-build-info": "tsx bin/update-build-info.ts", "chore:update-build-info": "tsx bin/update-build-info.ts",

View File

@ -74,7 +74,7 @@ export default defineConfig({
/* Run your local dev server before starting the tests */ /* Run your local dev server before starting the tests */
webServer: !process.env.TRILIUM_DOCKER ? { webServer: !process.env.TRILIUM_DOCKER ? {
command: 'npm run integration-mem-db-dev', command: 'npm run test:integration-mem-db-dev',
url: SERVER_URL, url: SERVER_URL,
reuseExistingServer: !process.env.CI, reuseExistingServer: !process.env.CI,
} : undefined, } : undefined,