Ensure JavaScript workflow runs tests with output (#298)

This commit is contained in:
l5y
2025-10-12 09:46:42 +02:00
committed by GitHub
parent 772c5888c3
commit 4329605e6f
2 changed files with 5 additions and 4 deletions

View File

@@ -12,6 +12,9 @@ permissions:
jobs:
frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v5
- name: Set up Node.js 22
@@ -19,11 +22,9 @@ jobs:
with:
node-version: '22'
- name: Install dependencies
run: npm install
working-directory: web
run: npm ci
- name: Run JavaScript tests
run: npm test
working-directory: web
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v5

View File

@@ -4,6 +4,6 @@
"type": "module",
"private": true,
"scripts": {
"test": "mkdir -p reports coverage && NODE_V8_COVERAGE=coverage node --test --experimental-test-coverage --test-reporter=junit --test-reporter-destination=reports/javascript-junit.xml && node ./scripts/export-coverage.js"
"test": "mkdir -p reports coverage && NODE_V8_COVERAGE=coverage node --test --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=reports/javascript-junit.xml && node ./scripts/export-coverage.js"
}
}