build(test): wire pnpm test to vitest, drop redundant test:vitest CI step

src/package.json:
- test: was mocha --import=tsx --recursive ...; now `vitest run` (vitest.config
  already includes tests/backend/specs, tests/backend-new/specs, and
  tests/container/specs)
- test-utils: vitest run with --testTimeout 5000
- test-container: vitest run tests/container/specs/api
- test:vitest renamed to test:watch (watch mode for local dev)

.github/workflows/backend-tests.yml:
- removed the redundant 'Run the new vitest tests' step from all 4 jobs since
  pnpm test now runs vitest itself
This commit is contained in:
SamTV12345 2026-04-26 16:02:13 +02:00
parent 42907a7cc4
commit 2a0bb2c62b
2 changed files with 4 additions and 16 deletions

View File

@ -68,9 +68,6 @@ jobs:
-
name: Run the backend tests
run: pnpm test
- name: Run the new vitest tests
working-directory: src
run: pnpm run test:vitest
withpluginsLinux:
env:
@ -137,9 +134,6 @@ jobs:
-
name: Run the backend tests
run: pnpm test
- name: Run the new vitest tests
working-directory: src
run: pnpm run test:vitest
# Windows tests only run on push to develop/master, not on PRs
withoutpluginsWindows:
@ -189,9 +183,6 @@ jobs:
name: Run the backend tests
working-directory: src
run: pnpm test
- name: Run the new vitest tests
working-directory: src
run: pnpm run test:vitest
withpluginsWindows:
env:
@ -267,6 +258,3 @@ jobs:
name: Run the backend tests
working-directory: src
run: pnpm test
- name: Run the new vitest tests
working-directory: src
run: pnpm run test:vitest

View File

@ -145,9 +145,9 @@
},
"scripts": {
"lint": "eslint .",
"test": "cross-env NODE_ENV=production mocha --import=tsx --timeout 120000 --recursive tests/backend/specs/**.ts ../node_modules/ep_*/static/tests/backend/specs/**",
"test-utils": "cross-env NODE_ENV=production mocha --import=tsx --timeout 5000 --recursive tests/backend/specs/*utils.ts",
"test-container": "mocha --import=tsx --timeout 5000 tests/container/specs/api",
"test": "cross-env NODE_ENV=production vitest run",
"test-utils": "cross-env NODE_ENV=production vitest run tests/backend/specs --testTimeout 5000",
"test-container": "cross-env NODE_ENV=production vitest run tests/container/specs/api",
"dev": "cross-env NODE_ENV=development node --import tsx node/server.ts",
"prod": "cross-env NODE_ENV=production node --import tsx node/server.ts",
"ts-check": "tsc --noEmit",
@ -157,7 +157,7 @@
"test-admin": "cross-env NODE_ENV=production npx playwright test tests/frontend-new/admin-spec --workers 1 --project=chromium",
"test-admin:ui": "cross-env NODE_ENV=production npx playwright test tests/frontend-new/admin-spec --ui --workers 1",
"debug:socketio": "cross-env DEBUG=socket.io* node --import tsx node/server.ts",
"test:vitest": "vitest"
"test:watch": "cross-env NODE_ENV=production vitest"
},
"version": "2.7.2",
"license": "Apache-2.0"