背景
Umi4使用腳本生成測試文件后,運(yùn)行測試以下錯(cuò)誤
AssertionError [ERR_ASSERTION]: Invalid config keys: antd, access, model, initialState, request, layout
解決方案
將 jest.config.ts 中的導(dǎo)入換為 max :
// jest.config.ts
-import { ... } from 'umi/test'
+import { ... } from '@umijs/max/test'