page-unit.ts and native-bridge.ts run the page's script outside a browser, so the page's coverage counted none of what they test, and native.ts read as mostly untested. In a coverage run they now run the script from a file of its own, named as the browser names it, under NODE_V8_COVERAGE (scripts/coverage-node.sh, before the browser suite in npm run coverage:page and coverage.sh api), and the report's teardown takes their record in, mapped to web/src by the build's source map: the page's lines went from 73.3% to 80.0% of 3,043, native.ts to 93 of 120. The cargo tests in coverage.sh's container run on Postgres, as production does, when IPX_TEST_DATABASE_URL names the _test database, from the shell or else /src/.envrc (that variable only); on SQLite without it. The integration tests' own files are left out of the totals; a crate's inline mod tests cannot be on stable Rust. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
1.0 KiB
JSON
30 lines
1.0 KiB
JSON
{
|
|
"name": "ipx-web",
|
|
"version": "1.3.1-dev",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "Builds the ipx web pages from web/src (web/build.mts, run by build.rs) and tests them. The Rust tests cover the server.",
|
|
"scripts": {
|
|
"build": "node web/build.mts",
|
|
"typecheck": "tsc -p . --noEmit false --declaration --emitDeclarationOnly --outDir target/page-types && tsc -p tsconfig.sw.json && tsc -p tsconfig.tools.json && tsc -p tsconfig.k6.json",
|
|
"coverage:page": "sh scripts/coverage-node.sh && IPX_COVERAGE=1 playwright test",
|
|
"smoke": "node tests/page-smoke.ts",
|
|
"test": "playwright test",
|
|
"test:headed": "playwright test --headed",
|
|
"load": "node tests/load/run.ts"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.56.0",
|
|
"@types/k6": "2.3.1",
|
|
"@types/node": "24.19.2",
|
|
"monocart-coverage-reports": "3.2.0",
|
|
"typescript": "^7.0.2"
|
|
},
|
|
"dependencies": {
|
|
"@fortawesome/fontawesome-free": "7.3.1",
|
|
"@swc/core": "^1.16.2",
|
|
"@swc/html": "^1.16.2",
|
|
"hls.js": "1.6.19"
|
|
}
|
|
}
|