ReviewOS

home-lang/home

Port nested bun test .only stdout behavior

#86
Closed chris opened this 10 days ago ·
10 days ago

Tracks the next bounded slice of #66.

The copied Bun corpus test js/bun/test/only-inside-only.test.ts runs a nested test process and verifies two behaviors together:

  • an inner test.only takes precedence inside describe.only;
  • user console.log output from the selected test is preserved on child stdout, while skipped tests emit nothing.

Implementation should remain general: capture per-file console stdout in the native Home test runner, own and propagate that output through FileRun/Summary, and write it to stdout in native file-mode CLI runs. Do not special-case this fixture.

Acceptance:

  • Fixture emits exactly one should run line on stdout
  • Parent Bun corpus test passes natively 1/1
  • Native selector regression asserts exact captured stdout
  • Clean-cache build succeeds
  • Land and cross-reference from #66
10 days ago

Landed on main in 34a89ba.

Implemented general native runner stdout propagation:

  • captures ordinary console.log output at the shared console stream writer;
  • carries owned stdout through FileRun and corpus Summary;
  • emits captured output on real stdout for native file-mode CLI runs;
  • activates js/bun/test/only-inside-only.test.ts without a fixture-specific result shim;
  • strengthens the native test.only precedence regression to assert exact should run\n output.

Verification:

  • clean-cache zig build --summary failures: pass
  • direct fixture stdout: exactly one should run line
  • exact upstream parent corpus test: 1 pass, 0 fail, 0 unsupported, 0 todo
  • broad home_test invocation compiled and ran 1,059 tests; 1,056 passed and the new regression passed. Two unrelated shell tests failed because that diagnostic invocation passed runner arguments through and caused nested commands to execute the Zig test binary; the canonical contention-free gate remains tracked in #81.

Closing this bounded slice; overall parity continues in #66.

Sign in to comment on this issue.