React Native jest 配置模块映射错误

问题描述 投票:0回答:1

在我的 Bare 项目中使用测试和模块映射器从 Expo 47 更新到 50 后遇到问题。 从日志中发出文本:

失败 src/features/Loan/Create/Lend/components/Checked/index.test.tsx ● 测试套件运行失败

Configuration error:

Could not locate module  mapped as:
/Users/a.trofimenko/Documents/Work/ReactNativeProjects/zirtue-app/src/$1.

测试成功运行 enter image description here enter image description here enter image description here

react-native jestjs ts-jest babel-jest
1个回答
0
投票

降级到“jest-expo”:“^49.0.0”解决了问题

© www.soinside.com 2019 - 2024. All rights reserved.