강의

멘토링

커뮤니티

Inflearn Community Q&A

seho48150606's profile image
seho48150606

asked

Developing React Native apps using the TDD development methodology

AddToDo Component

저 또한 TextInput을 찾지 못합니다..

Written on

·

245

0

윗 분 질문이 동일하게 있으나 답변이 없어 다시 질문 올립니다!

javascriptreacttddreact-native

Answer 1

0

enzyme에서 제공하는 debug 함수로 확인 해본결과 

 <View>

   <Component allowFontScaling={true}rejectResponderTermination={true} underlineColorAndroid="transparent" />

  <Button title="A" />

</View> 값을 리턴 받습니다.

테스트 코드를 작성하는 곳에서 

import { TextInput } from 'react-native';

expect(wrapper.find(TextInput)).toHaveLength(1);

이러한 형태로 테스트를 진행하시면 통과가 됩니다.

seho48150606's profile image
seho48150606

asked

Ask a question