Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove hard set tap colors #4689

Closed
wants to merge 1 commit into from
Closed

Conversation

wraithgar
Copy link
Member

The original PR #2225 indicated that this
would prevent snapshot failures in CI with no color, but I hard set this
to "0" and ran tests and they passed. This will make debugging tests in
CI environments like the Node.js CITGM much easier.

@wraithgar wraithgar requested a review from a team as a code owner April 6, 2022 14:34
@wraithgar
Copy link
Member Author

The fact that tests fail here seems like a bug in testing and/or NPM. The tests all appear to be trying to set color but that isn't always translating to the output.

@wraithgar wraithgar marked this pull request as draft April 6, 2022 14:42
@npm-robot
Copy link
Contributor

npm-robot commented Apr 6, 2022

found 1 benchmarks with statistically significant performance regressions

  • app-medium: no-lock
timing results
app-large clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
npm@8 51.371 ±0.08 27.461 ±0.59 15.948 ±0.06 19.727 ±1.33 2.832 ±0.08 2.770 ±0.01 2.351 ±0.20 10.388 ±0.13 2.188 ±0.00 3.100 ±0.04
#4689 49.652 ±0.08 28.569 ±1.78 16.173 ±0.03 21.248 ±3.39 2.807 ±0.01 2.787 ±0.01 2.230 ±0.01 12.504 ±2.89 2.214 ±0.02 3.267 ±0.14
app-medium clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
npm@8 35.876 ±4.84 21.067 ±0.04 11.730 ±0.06 12.559 ±0.29 2.499 ±0.01 2.506 ±0.01 3.319 ±1.53 7.780 ±0.01 2.102 ±0.00 2.793 ±0.02
#4689 36.672 ±3.07 21.242 ±0.15 11.860 ±0.06 12.586 ±0.09 2.546 ±0.03 4.371 ±0.53 3.700 ±0.06 7.922 ±0.13 2.106 ±0.01 2.838 ±0.01

The original PR #2225 indicated that this
would prevent snapshot failures in CI with no color, but I hard set this
to "0" and ran tests and they passed.  This will make debugging tests in
CI environments like the Node.js CITGM much easier.

The reason for the failures is because even if we hard set environment
variables in tests to force color one way or another, chalk has already
made up its mind so changing those in the same process won't affect
anything.  The fix is to hard set two values in the actual `npm test`
script to make `chalk` and `supports-color` do what we need.

The `sudo` test commands were also removed because we do not want to
encourage running npm w/ sudo.
@wraithgar
Copy link
Member Author

I'll come back to this

@lukekarrys lukekarrys deleted the gar/tap-color-test branch April 29, 2024 20:41
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