jest 的使用直接看文档就可以了,本文不会描述 jest 的具体使用流程,主要是一些使用 case。 需要 jest 26 以上版本 使用 ts 来写 jest config jest 默认是支持直接使用 ts 来写 config, 可以从 @jest/types 中获取得到配置类型定义。 import type {Config} from '@jest/types'; const config: Con...
jest 的使用直接看文档就可以了,本文不会描述 jest 的具体使用流程,主要是一些使用 case。 需要 jest 26 以上版本 使用 ts 来写 jest config jest 默认是支持直接使用 ts 来写 config, 可以从 @jest/types 中获取得到配置类型定义。 import type {Config} from '@jest/types'; const config: Con...