Skip to content

Enable colored output in tests#1298

Merged
nayeemrmn merged 2 commits intodenoland:mainfrom
stefnotch:feat/remove-no-color
May 29, 2025
Merged

Enable colored output in tests#1298
nayeemrmn merged 2 commits intodenoland:mainfrom
stefnotch:feat/remove-no-color

Conversation

@stefnotch
Copy link
Contributor

@stefnotch stefnotch commented May 10, 2025

I disabled the env["NO_COLOR"] setting for the Deno that is spawned.

Instead, since VSCode actually handles ANSI color escapes, I forcibly enable the color setting. The reasoning is that it's entirely possible to start VSCode from the terminal. (e.g. when I configure my git editor to be VSCode, then VSCode gets started from the terminal).
And I do think that it would be confusing if the NO_COLOR terminal setting would affect the test output inside a GUI application.

absolutely gorgeous colors in VSCode

Since I don't know the full impact of this change: What should I test?
Could this change, for example, break the Deno LSP tests?

Investigation

As far as I can tell from the git blame, the env["NO_COLOR"] was added 4 years ago, but I couldn't dig up further information as to why.

Linked issues

Fixes #1156
Fixes #1267

Copy link

@Mrashes Mrashes left a comment

Choose a reason for hiding this comment

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

Fix makes a lot of sense to me. Not a contributor so can't approve but don't see why this can't be merged.

Copy link
Collaborator

@nayeemrmn nayeemrmn left a comment

Choose a reason for hiding this comment

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

LGTM

@nayeemrmn nayeemrmn merged commit a4b4615 into denoland:main May 29, 2025
2 checks passed
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.

support Test Explorer - Colored Output Allow NO_COLOR env var to be overridden by deno.env workspace setting

3 participants