美文网首页
TypeScript 配置jest (ts-jest) (问题

TypeScript 配置jest (ts-jest) (问题

作者: wuzinong | 来源:发表于2019-04-04 13:26 被阅读0次

1. npm install--save-devjest typescript ts-jest @types/jest    运行 npx ts-jest config:init

2. 目录结构

3. 配置tsconfig

4.配置jest.config.js  

rootDir会生成绝对路径:(这边去除了redux目录,报错后生成的路径为绝对路径)

reference:https://kulshekhar.github.io/ts-jest/user/config/

相关文章

网友评论

      本文标题:TypeScript 配置jest (ts-jest) (问题

      本文链接:https://www.haomeiwen.com/subject/jwpfiqtx.html