Skip to content

feat: disable colors if agent is detected#9851

Open
sheremet-va wants to merge 3 commits intovitest-dev:mainfrom
sheremet-va:feat/disable-colors-for-agents
Open

feat: disable colors if agent is detected#9851
sheremet-va wants to merge 3 commits intovitest-dev:mainfrom
sheremet-va:feat/disable-colors-for-agents

Conversation

@sheremet-va
Copy link
Member

@sheremet-va sheremet-va commented Mar 12, 2026

  • Should this be configurable?

@netlify
Copy link

netlify bot commented Mar 12, 2026

Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit 3044f76
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/69b2880815707e0008658c51
😎 Deploy Preview https://deploy-preview-9851--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

hi-ogawa
hi-ogawa previously approved these changes Mar 13, 2026
Copy link
Contributor

@hi-ogawa hi-ogawa left a comment

Choose a reason for hiding this comment

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

configurable?

I don't think that's needed now

Copy link
Member

@AriPerkkio AriPerkkio left a comment

Choose a reason for hiding this comment

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

Looks good. There's still some icon colors that are set at module load level but that's fine I think.

export const pointer: string = c.yellow(F_POINTER)
export const skipped: string = c.dim(c.gray(F_DOWN))
export const todo: string = c.dim(c.gray(F_TODO))
export const benchmarkPass: string = c.green(F_DOT)
export const testPass: string = c.green(F_CHECK)
export const taskFail: string = c.red(F_CROSS)
export const suiteFail: string = c.red(F_POINTER)
export const pending: string = c.gray('·')
export const separator: string = c.dim(' > ')

  RUN  v4.1.0-beta.6 /x/vitest/test/config/fixtures/console-color

stdout | basic.test.ts\x1B[2m > \x1B[22mconsole color
true

 \x1B[32m✓\x1B[39m basic.test.ts (1 test) 1ms

 Test Files  1 passed (1)
      Tests  1 passed (1)
   Start at  22:07:30
   Duration  85ms (transform 11ms, setup 0ms, import 16ms, tests 1ms, environment 0ms)

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.

3 participants