Cev*_*mas 6 react-native enzyme
与 Expo 一起反应本机应用程序。安装 Jest 和 Enzyme
想要Mount在组件上运行 Enzyme,以便我可以测试状态更新。
我有这个简单的测试
describe("State checking", () => {
test("Make sure that State gets added from Route params", () => {
const component = mount(<Categories/>);
const instance = component.instance();
console.log(instance);
})
})
Run Code Online (Sandbox Code Playgroud)
运行此程序时,我从测试中收到此错误:
Warning: <View /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.
Warning: The tag <View> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.
Run Code Online (Sandbox Code Playgroud)
这里发生了什么?它不能识别我正在使用 React Native 吗?
我研究过这个问题但没有得到任何有用的结果。
感谢您的时间。
| 归档时间: |
|
| 查看次数: |
161 次 |
| 最近记录: |