Skip to content

test: guard the fake --output lookup in report tests - #8

Merged
Cenadros merged 1 commit into
mainfrom
test/report-fake-spawn-output-guard
Sep 11, 2026
Merged

Cenadros merged 1 commit into
mainfrom
test/report-fake-spawn-output-guard

Conversation

@Cenadros

Copy link
Copy Markdown
Contributor

Summary

Two fake spawns in tests/report/advisory.test.ts indexed args[indexOf("--output") + 1] without checking for -1. For fallow invocations that resolved to args[0], so running the suite wrote a stray dupes/index.html into the working directory. A shared writeHtmlOutput helper replaces the four copies of that block.

Verification

  • typecheck, oxlint, 428 vitest tests; no stray directory after the run.

Two fake spawns indexed args[indexOf("--output") + 1] without checking
for -1, so a fallow invocation resolved to args[0] and the test wrote a
stray dupes/index.html into the working directory. Shared helper
writeHtmlOutput replaces the four copies.
@Cenadros
Cenadros requested a review from a team September 11, 2026 08:03
@Cenadros
Cenadros merged commit 3cc1e10 into main Sep 11, 2026
4 checks passed
@Cenadros
Cenadros deleted the test/report-fake-spawn-output-guard branch September 11, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant