Tests not working anymore after updating to version < 24.0.0

时间:2019-04-08 13:35:24

标签: javascript typescript jestjs

Today, we've updated to the newest version of jest in our TypeScript project. We've included jest in our package.json of our project with"jest": "^24.7.1". We've also included "jest-when": "^2.4.0".

When we run now our tests, we get 1531 errors that jest wasn't found:

  • Cannot find name 'jest'.
  • Cannot find name 'expect'.
  • Cannot find name 'it'. Do you need to install type definitions for a test runner? Trynpm i @types/jestornpm i @types/mochaand then addjestormochato the types field in your tsconfig.

and much more.

We include jest in our spec's with import 'jest'; at the top.

Does anyone has an idea what could be the problem?

System:
    OS: macOS 10.14.3
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Binaries:
    Node: 11.10.1 - /usr/local/bin/node
    Yarn: 1.13.0 - /usr/local/bin/yarn
    npm: 6.7.0 - /usr/local/bin/npm
  npmPackages:
    jest: ^24.7.1 => 24.7.1 

0 个答案:

没有答案