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

Fix failing CI tests #27

Closed
msabramo opened this issue Sep 13, 2021 · 0 comments · Fixed by #28
Closed

Fix failing CI tests #27

msabramo opened this issue Sep 13, 2021 · 0 comments · Fixed by #28

Comments

@msabramo
Copy link
Contributor

msabramo commented Sep 13, 2021

The GitHub Actions CI has been failing for a while because the output is not rendering colored.

I think I know why...

msabramo added a commit to msabramo/chalk-cli that referenced this issue Sep 13, 2021
The GitHub Actions CI has been failing for a while because the output is
not rendering colored. This is because `test.js` was setting
`FORCE_COLOR=1` but this happens after the `import` of chalk` and thus
also after the import within chalk of
[`supports-color`](https://www.npmjs.com/package/supports-color)

JS likes imports to be at the top of files before any other logic, so
it's not really possible to set `FORCE_COLOR` any earlier within
`test.js`. But it *is* possible to set it in `package.json` while
invoking `ava`...

Fixes: chalkGH-27
msabramo added a commit to msabramo/chalk-cli that referenced this issue Sep 13, 2021
The GitHub Actions CI has been failing for a while because the output is
not rendering colored. This is because `test.js` was setting
`FORCE_COLOR=1` but this happens after the `import` of `chalk` and thus
also after the import within chalk of
[`supports-color`](https://www.npmjs.com/package/supports-color)

JS likes imports to be at the top of files before any other logic, so
it's not really possible to set `FORCE_COLOR` any earlier within
`test.js`. But it *is* possible to set it in `package.json` while
invoking `ava`...

Fixes: chalkGH-27
msabramo added a commit to msabramo/chalk-cli that referenced this issue Sep 14, 2021
The GitHub Actions CI has been failing for a while because the output is
not rendering colored. This is because `test.js` was setting
`FORCE_COLOR=1` but this happens after the `import` of `chalk` and thus
also after the import within chalk of
[`supports-color`](https://www.npmjs.com/package/supports-color)

JS likes imports to be at the top of files before any other logic, so
it's not really possible to set `FORCE_COLOR` any earlier within
`test.js`. But it *is* possible to set it in `package.json` while
invoking `ava`...

Fixes: chalkGH-27
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 a pull request may close this issue.

1 participant