在测试ReactNative应用程序的一个组件时,我遇到了一个Jest问题。其他一些组件已经按照预期使用相同的jest配置通过了测试,但是这个组件抛出了奇怪的错误,所以需要帮助。{ View, Text } from "react-native";
import { TextInput, Button } from "react-native-pap
我正在使用jest来创建react原生组件的快照。我使用babel 7。我可以创建快照,但是快照不是为TouchableOpacity组件创建的。我已经尝试更新反应测试渲染器的最新版本,但这没有帮助。快照测试文件Button.test.js -- import renderer from 'react-test-renderer';
im
测试由于反应本机权限而失败react-native-permissions: NativeModule.RNPermissions is null.<anonymous> (node_modules/react-native-qrcode-scanner/index.js:19:1)在安装react-native-qrcode-scanner和react-n
我有一个世博会项目,我想在其中使用挂钩。 在启动我的应用程序时,我得到了以下错误: TypeError: dispatcher.useState is not a function.dispatcher.useState(initialState)', 'dispatcher.useState' is undefined) 根据another well referenced issue中的建议,我已经更新了我的package.json以包括: "react": "
我一直在使用“react-test-renderer”来测试react-native,主要是在它的函数上。最近我发现有一个用于react-native的测试库,它是@ that library /react-native。我想要做的是检查函数中是否调用了navigation.navigate或alert。我不知道这些库中有哪些可以做到这一点,以及