test(cli-framework): specify terminal capabilities in hyperlink tests
PR
2h ago+20+20+01234567890123456789-2-2-0123456789
What & why
The hyperlink tests set stdout to a TTY but inherit TERM. Under TERM=dumb the formatter correctly emits plain text and two assertions fail. Set the terminal type explicitly for the table tests, restore the caller’s environment afterward, and exercise plain URLs on a dumb TTY.
How I tested it
- On this branch, macOS arm64 with Bun 1.4.3 and TERM=dumb: from packages/cli-framework,
bun test src/output.test.ts— 15 pass, 0 fail. - This patch was also part of the combined macOS verification for #9625: all 30 repository test tasks passed in one uncached run, with default workers and timeouts. Repo-wide lint and typecheck passed on that combined checkout.
Checklist
- Conventional PR title
- Lint and typecheck passed on the combined verification checkout
- Allow maintainer edits
- Signed CLA
Summary by cubic
Makes hyperlink table tests deterministic by setting the terminal type explicitly instead of inheriting TERM from the environment.
- Sets
TERM=xterm-256colorfor table tests and restores the caller's environment afterward. - Adds a test asserting plain URLs are emitted when
TERM=dumb.
Summary by CodeRabbit
- Tests
- Added coverage to verify URLs are printed without hyperlink formatting in dumb terminals.