mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-03-29 09:40:22 +00:00
- Install nyc for Istanbul instrumentation - Add scripts/instrument-frontend.sh to instrument public/*.js - Add scripts/collect-frontend-coverage.js to extract window.__coverage__ - Add scripts/combined-coverage.sh for combined server+frontend coverage - Make server.js serve public-instrumented/ when COVERAGE=1 is set - Add test:full-coverage npm script - Add public-instrumented/ and .nyc_output/ to .gitignore
11 lines
433 B
Bash
11 lines
433 B
Bash
#!/bin/sh
|
|
# Instrument frontend JS for coverage tracking
|
|
rm -rf public-instrumented
|
|
npx nyc instrument public/ public-instrumented/ --compact=false
|
|
# Copy non-JS files (CSS, HTML, images) as-is
|
|
cp public/*.css public-instrumented/ 2>/dev/null
|
|
cp public/*.html public-instrumented/ 2>/dev/null
|
|
cp public/*.svg public-instrumented/ 2>/dev/null
|
|
cp public/*.png public-instrumented/ 2>/dev/null
|
|
echo "Frontend instrumented successfully"
|