Files
meshcore-analyzer/scripts/combined-coverage.sh
you 860d5c574e test: expanded frontend coverage collection with page interactions
367 lines of Playwright interactions covering nodes, packets, map,
analytics, customizer, channels, live, home pages.
Fixed e2e channels assertion (chList vs chResp.channels).
2026-03-24 03:43:27 +00:00

28 lines
782 B
Bash

#!/bin/sh
# Run server-side tests with c8, then frontend coverage with nyc
set -e
# 1. Server-side coverage (existing)
npx c8 --reporter=json --reports-dir=.nyc_output node tools/e2e-test.js
# 2. Instrument frontend
sh scripts/instrument-frontend.sh
# 3. Start instrumented server
COVERAGE=1 PORT=13581 node server.js &
SERVER_PID=$!
sleep 5
# 4. Run Playwright tests (exercises frontend code)
BASE_URL=http://localhost:13581 node test-e2e-playwright.js || true
BASE_URL=http://localhost:13581 node test-e2e-interactions.js || true
# 5. Collect browser coverage
BASE_URL=http://localhost:13581 node scripts/collect-frontend-coverage.js
# 6. Kill server
kill $SERVER_PID 2>/dev/null || true
# 7. Generate combined report
npx nyc report --reporter=text-summary --reporter=text