Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jest Not Displaying Colors, Or Accepting Commands

I'm running Jest to test a Create React App in a Git-Bash terminal, on Windows 7. It's running the tests as it should; but it isn't displaying the PASS/FAIL messages with color enhancements.

Also, when it asks for a 'u' to update snapshots, it doesn't accept the u. Control-C'ing after trying the u, I see the u as the first command once Jest has stopped running.

Has anyone seen these behaviors before? Any idea how to fix?

Thanks for your help.

like image 647
NotoriousWebmaster Avatar asked Oct 25 '25 19:10

NotoriousWebmaster


1 Answers

Add export FORCE_COLOR=true into your .bash_profile or .bashrc.

Source: https://github.com/facebook/jest/issues/3877#issuecomment-422088942

like image 74
Kostiantyn Ko Avatar answered Oct 27 '25 10:10

Kostiantyn Ko