Appearance
Coverage
EasyTrace shows line, statement, function and branch coverage for Vitest and Jest runs, with the change against the baseline (the latest default-branch run of the same suite) and per-file details.
Setup
- Make the tests write Istanbul JSON —
coverage/coverage-final.json(orcoverage-summary.json):- Vitest:
vitest run --coveragewith@vitest/coverage-v8(or-istanbul) installed. The default reporters includejson; if you setcoverage.reporteryourself, keep'json'in the list. - Jest:
jest --coverage --coverageReporters=json.
- Vitest:
- Declare the file(s) on the suite in
easytrace.config.json:
json
{
"suites": {
"server": {
"reports": "apps/server/.easytrace/vitest.json",
"coverage": "apps/server/coverage/coverage-final.json"
},
"web": {
"reports": "apps/web/.easytrace/vitest.json",
"coverage": "apps/web/coverage/coverage-final.json"
}
}
}Coverage is uploaded right after the suite's results; the CLI prints it on the same line:
text
Uploaded 346 passed from 1 file (suite web) · coverage 81.3% lines → https://…Several coverage files for one suite
coverage accepts a list or a glob; the files are merged into one report. Paths are made relative to the git root, so files from different packages don't collide. If the same source file appears in two coverage files, the later one is kept and the CLI warns.
Only fresh coverage
With easytrace run, a coverage file older than the run is skipped with a warning — the same rule as reports — so an old coverage/ folder never passes as today's coverage.
Sharded runs
A run split into shards can't upload coverage per shard. Merge the shards' coverage in a final job, then:
bash
easytrace coverage coverage/coverage-final.json --suite unitIt attaches the merged coverage to the run with the same build id and suite (the run can already be finished).
text
Uploaded coverage for 412 files (82.4% lines) → https://…