Conversation
✅ Deploy Preview for rstest-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes compatibility with the NO_COLOR environment variable by modifying the FORCE_COLOR setting in the test environment configuration. The change ensures that when NO_COLOR is set to '1', color output is disabled by setting FORCE_COLOR to '0', otherwise it defaults to '1' to enable colors.
- Updates FORCE_COLOR logic to respect NO_COLOR environment variable
- Maintains backward compatibility by defaulting to colored output when NO_COLOR is not set
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| NODE_ENV: 'test', | ||
| // enable diff color by default | ||
| FORCE_COLOR: '1', | ||
| FORCE_COLOR: process.env.NO_COLOR === '1' ? '0' : '1', |
There was a problem hiding this comment.
The NO_COLOR environment variable should be checked for any truthy value, not just '1'. According to the NO_COLOR standard (https://no-color.org/), any non-empty value should disable colors. Consider using process.env.NO_COLOR ? '0' : '1' instead.
| FORCE_COLOR: process.env.NO_COLOR === '1' ? '0' : '1', | |
| FORCE_COLOR: process.env.NO_COLOR ? '0' : '1', |
Summary
Related Links
Checklist