fix: use test:run script and add timeouts to badge workflow (#84)

- Add test:run script to frontend package.json (consistent with backend)
- Use npm run test:run instead of npm run test -- --run
- Add timeout-minutes to prevent infinite hangs
This commit is contained in:
Daniel Volz
2026-01-30 19:30:07 +01:00
committed by GitHub
parent 156e54f0ea
commit 9ed039724e
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -41,6 +41,7 @@ jobs:
- name: Run backend tests and capture count
id: backend-tests
working-directory: backend
timeout-minutes: 5
env:
CI: true
run: |
@@ -53,10 +54,11 @@ jobs:
- name: Run frontend tests and capture count
id: frontend-tests
working-directory: frontend
timeout-minutes: 10
env:
CI: true
run: |
OUTPUT=$(npm run test -- --run 2>&1) || true
OUTPUT=$(npm run test:run 2>&1) || true
echo "$OUTPUT"
# Extract "Tests X passed" from output
PASSED=$(echo "$OUTPUT" | grep -oP 'Tests\s+\K\d+(?=\s+passed)' | tail -1)
+1
View File
@@ -12,6 +12,7 @@
"format": "npx biome format --write .",
"check": "npx biome check . && tsc --noEmit",
"test": "vitest",
"test:run": "vitest run",
"test:coverage": "vitest run --coverage"
},
"dependencies": {