Home > Net >  Jest snapshot tests failing in GitHub Actions due to missing color
Jest snapshot tests failing in GitHub Actions due to missing color

Time:05-21

I am having an issue while trying to set up a Github action that runs my Jest test suite. It CI/CD environment showing where test fails

CodePudding user response:

Assuming you run your tests with npm test, you can set the environment variable FORCE_COLOR and thereby make jest use color in GitHub Actions as well:

- run: npm test
  env:
    FORCE_COLOR: true
  • Related