How to solve TypeError: environment.teardown is not a function

前端 未结 6 790
刺人心
刺人心 2021-01-18 01:27

I can\'t test an application which was created with create-react-app.

All guides says that test is working by default, but when I try "yarn test", it requir

6条回答
  •  心在旅途
    2021-01-18 01:43

    In my case it throws this error because I create my React project using create-react-app and install jest. In certain way it conflicts.

    I solve it by removing jest from my project and using the create-react-app test script.

提交回复
热议问题