Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions rstest.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { defineConfig } from '@rstest/core';

process.env.NO_COLOR = '1';
Comment thread
chenjiahan marked this conversation as resolved.

export default defineConfig({

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep NO_COLOR set for deterministic snapshot tests

Removing the NO_COLOR assignment makes test output depend on the caller’s terminal/color env, and tests/logger.test.ts still has snapshot assertions (should log error with stack correctly / should log error with cause correctly) that compare raw logger strings without stripAnsi; when FORCE_COLOR=1 (or another color-enabling setup) util.styleText adds ANSI escapes and these snapshots no longer match. Keeping NO_COLOR in test config (or stripping ANSI in those tests) avoids this environment-specific failure.

Useful? React with 👍 / 👎.

globals: true,

Copilot AI Mar 8, 2026

Copy link

Choose a reason for hiding this comment

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

Removing the NO_COLOR override can make snapshot expectations sensitive to whether ANSI styling is enabled in the test environment. In this repo, the logger error snapshots (e.g. logger.error(err) cases) don't strip ANSI codes, so if util.styleText starts emitting color again those snapshots can change. Consider either keeping the env override in test config, or updating the error snapshot assertions/setup to normalize/strip ANSI so snapshots remain deterministic across environments.

Suggested change
globals: true,
globals: true,
env: {
NO_COLOR: '1',
},

Copilot uses AI. Check for mistakes.
});