cannot find name it in jest typescript

后端 未结 4 1269
Happy的楠姐
Happy的楠姐 2020-12-30 02:40

I try to create an intial setup for jest in react + typescript.I have completed the initial setup and try to check whether the test runs. When i run the test using the comma

4条回答
  •  醉酒成梦
    2020-12-30 03:18

    In tsconfig.json add the below code

    "types": ["jest"],
    "typeRoots": ["./src/types", "node_modules/@types"],
    

提交回复
热议问题