我正在尝试在react native中测试组件,但是它被卡在浅层测试中。如果我通过了不正确的组件,则测试将失败,但是如果我通过了本机的文本组件,则会卡住。
import React from "react";
import Enzyme, {shallow, mount} from "enzyme";
import Screen from 'react-native-login'
import Adapter from "enzyme-adapter-react-16"
import { configure } from 'enzyme'
import {Text} from 'react-native'
configure({ adapter: new Adapter() })
test('render with react-native component', () => {
const wrapper = shallow(<Text />); // Hangs
})