1. npm install--save-devjest typescript ts-jest @types/jest 运行 npx ts-jest config:init
2. 目录结构


3. 配置tsconfig

4.配置jest.config.js

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

1. npm install--save-devjest typescript ts-jest @types/jest 运行 npx ts-jest config:init
2. 目录结构
3. 配置tsconfig
4.配置jest.config.js
rootDir会生成绝对路径:(这边去除了redux目录,报错后生成的路径为绝对路径)
本文标题:TypeScript 配置jest (ts-jest) (问题
本文链接:https://www.haomeiwen.com/subject/jwpfiqtx.html
网友评论