简体   繁体   中英

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

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM