Skip to content

chore(test): remove NO_COLOR workaround for Rstest - #526

Merged
chenjiahan merged 1 commit into
mainfrom
chore/remove-rstest-color-workaround
Sep 28, 2026
Merged

chenjiahan merged 1 commit into
mainfrom
chore/remove-rstest-color-workaround

Conversation

@fi3ework

Copy link
Copy Markdown
Member

Motivation

Rstest used to inject FORCE_COLOR=1 into test worker processes (on a TTY or with CI=true) unless the host already had a color env set. process.env.NO_COLOR = '1' in the rstack test config was there to stop that injection, so CLI output assertions stayed plain.

Since @rstest/core 0.12.2 (web-infra-dev/rstest#1893), Rstest no longer writes any color env into workers. The catalog already requires ~0.12.2.

Changes

Remove the NO_COLOR override from packages/rstack/rstack.config.ts. With CI=true, the full suite passes without it; on @rstest/core 0.12.1, 76 tests fail without it.

delete env.FORCE_COLOR in the fmt test helpers is kept: Node's styleText gives FORCE_COLOR precedence over NO_COLOR, so it still protects spawned CLI output when FORCE_COLOR comes from the user's shell or CI.

Rstest no longer injects FORCE_COLOR into test workers since @rstest/core 0.12.2, so the test config no longer needs to disable colors.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-28T05:35:45.491067Z 9b67e6d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying rstack-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9b67e6d
Status: ✅  Deploy successful!
Preview URL: https://467fcf1b.rstack-cli.pages.dev
Branch Preview URL: https://chore-remove-rstest-color-wo.rstack-cli.pages.dev

View logs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b67e6dca1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/rstack/rstack.config.ts
@chenjiahan
chenjiahan merged commit df46cc8 into main Sep 28, 2026
5 checks passed
@chenjiahan
chenjiahan deleted the chore/remove-rstest-color-workaround branch September 28, 2026 05:36
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.

2 participants