Test runner and react-app-rewired

Team recently switched to react-app-rewired from create-react-app and as a result I'm not able to run tests via IntelliJ like I used to. I'm unsure how to remedy this after searching and the errors provided aren't too informative.

Currently I'm just running the tests in my console via npm run test [path to test] but I really do miss the IntelliJ test runner. Tried updating my test configuration to use /app/node_modules/react-app-rewired but that results in this unhelpful message.

 

Unknown script "--colors".
Perhaps you need to update react-scripts?
See: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#updating-to-new-releases

Process finished with exit code 0

At my wits end with this, if someone could please help me that would be greatly appreciated.

IntelliJ IDEA 2022.3.3 (Ultimate Edition)

0
3 comments
https://youtrack.jetbrains.com/issue/WEB-57713/Unable-to-run-Jest-test-using-react-app-rewired-Unknown-script-colors is fixed in 2023.1, please consider updating `IntelliJ IDEA` to the recent version and let us know if the issue persists
0

Yup, this fixed the issue. Thanks for everything!

0
Great, thanks for letting us know!
0

Please sign in to leave a comment.