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

前端 未结 6 838
刺人心
刺人心 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:52

    You shouldn't need to install jest-cli yourself. It should come out of the box.

    Try the following:

    1. Delete package-lock.json, yarn.lock and node_modules
    2. Remove jest from the dependencies in package.json
    3. Then do npm install or yarn install.

提交回复
热议问题