Any warnings related to react code for jest enzyme unit tests fails the tests instead of just displaying the warning

Viewed 1241

I have recently done jest enzyme configuration for my react project. The issue is any warning from react code causes my test cases to fail. Is there any way I can do the jest enzyme configuration so that my tests runs even when there is some warning? My code is fully functional and I want to ignore warnings for my tests and just want my test cases to run instead of failing immediately whenever any small warning comes.

1 Answers

To disable warning, you can use the --silent flag. So run your tests with jest --silent.

Related