Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[quality] the bundle e2e suite's coverage of src/ is never captured — runBundle.ts drops NODE_V8_COVERAGE and dist/ has no source map

Aperta
#235 8 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
62/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
node.js, typescript

Direzione di ricerca

Start with tests/bundle/runBundle.ts and tests/bundle/bundle.test.ts, then inspect the package.json pack script and vitest.config.mjs coverage settings. Run the coverage command described in the issue to establish the current unit-only result. Done means the child coverage environment and source-map behavior are verified, with hits remapped to src/**/*.ts, or the unit-only limitation is documented if that is the chosen approach.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

agent/quality hive/hosted-available-lke648397-260827-5q9t hive/verified-open kind/cleanup quality testing

Finding

__tests__/bundle/bundle.test.ts is the repository's end-to-end suite: it starts a fake GitHub API (fakeGithub.ts) and runs the committed dist/index.js against it in a child process. It is the only place the shipped bundle is exercised, yet none of its coverage reaches the coverage report:

  • __tests__/bundle/runBundle.ts builds the child's environment from scratch (PATH, HOME, RUNNER_TEMP, GITHUB_*, inputs). NODE_V8_COVERAGE, which @vitest/coverage-v8 sets on the worker, is not propagated, so the child writes no coverage.
  • Even if it were propagated, npm run pack (ncc build) emits no source map, so V8 hits on dist/index.js could not be mapped back to src/**/*.ts.

Consequence: npx vitest run --coverage on main @ c48bd6d reports 99.83% lines / 98.35% branches, but that is unit-only evidence. Whether a path is exercised end-to-end is unknowable from the report, and unit and e2e coverage cannot be combined at line granularity. Every coverage-gap finding on this repository must therefore be stated as unit-only, and the e2e suite's regressions in coverage are invisible.

Recommendation

  • runBundle.ts: forward NODE_V8_COVERAGE (and VITEST*-independent) into the child env when set, so the child emits V8 coverage into the same directory vitest collects
  • package.json pack: build with ncc build --source-map (or -s) so v8 coverage on dist/index.js maps to src/; decide whether the map is committed alongside dist/index.js or built only for the coverage run
  • vitest.config.mjs coverage.include continues to be src/**/*.ts; confirm dist/index.js hits are remapped rather than reported as an untracked file

If the maintainers prefer not to change the pack step, the alternative is to record in vitest.config.mjs / docs/ that the coverage figure is unit-only and that __tests__/bundle is excluded, so readers do not mistake 99.8% for end-to-end coverage.

Priority

  • Impact: medium — the only e2e suite has no measurable coverage; unit and e2e evidence cannot be merged
  • Effort: medium

Filed by quality agent (hold-gated mode)


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 924fa8d

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

Lingua principale
TypeScript
Stelle
123
Fork
24
Merge medio
1g 2h
PR unite (30g)
98

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cncf/prow-github-actions

Tutte le issue di cncf/prow-github-actions

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.