Repository navigation
Conversation
### Description GitHub Actions CI sets `NO_COLOR: true` in `.github/workflows/node-test.yml`, while local interactive terminals satisfy `colorette` v2's load-time `tty.isatty(1)` check and wrap `bold(...)` strings in ANSI escape codes. This mismatch caused five unit tests across `hosting:clone`, `login`, and `ext:migrate` to pass in CI but fail locally. Set `process.env.NO_COLOR = "true"` at the top of `src/test/helpers/mocha-bootstrap.js`. Because Mocha loads `mocha-bootstrap.js` before `global-mock-auth.ts` (which first imports `colorette`), local `npm test` and `npx mocha` runs now match CI while keeping Mocha's own colored test output intact. ### Scenarios Tested - Ran the three spec files that were previously failing only locally (`hosting-clone.spec.ts`, `login.spec.ts`, and `migrate.spec.ts`) in an interactive TTY (`53 passing`). - Ran the full unit test suite (`npm run mocha:fast`) in an interactive TTY (`5,879 passing`). - Ran `npm run lint:changed-files`. ### Sample Commands N/A
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the Mocha bootstrap helper to set the NO_COLOR environment variable to "true". This ensures that colorette does not emit ANSI color codes during local TTY test runs, aligning local test execution with the CI environment. There are no review comments, so I have no feedback to provide.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
GitHub Actions CI sets
NO_COLOR: truein.github/workflows/node-test.yml, while local interactive terminals satisfycolorettev2's load-timetty.isatty(1)check and wrapbold(...)strings in ANSI escape codes. This mismatch caused five unit tests acrosshosting:clone,login, andext:migrateto pass in CI but fail locally.Set
process.env.NO_COLOR = "true"at the top ofsrc/test/helpers/mocha-bootstrap.js. Because Mocha loadsmocha-bootstrap.jsbeforeglobal-mock-auth.ts(which first importscolorette), localnpm testandnpx mocharuns now match CI while keeping Mocha's own colored test output intact.Scenarios Tested
hosting-clone.spec.ts,login.spec.ts, andmigrate.spec.ts) in an interactive TTY (53 passing).npm run mocha:fast) in an interactive TTY (5,879 passing).npm run lint:changed-files.Sample Commands
N/A