ReferenceError: describe is not defined in Jest + Typescript

后端 未结 4 1860
灰色年华
灰色年华 2021-01-19 07:44

Simple configuration of Jest with ts-jest produces error \"ReferenceError: describe is not defined\" in runtime. Here minimal example: https://github.com/PFight/jest-ts-desc

4条回答
  •  误落风尘
    2021-01-19 08:25

    Or you can add the type definitions for jest like this in your tsconfig: "include": ["node_modules/@types", "test/**/**.ts"],

    And add the types via installing it with npm -i @types/jest

    I can't push to your repo though creating a PR is not possible..

提交回复
热议问题