Update enzyme-tests.tsx

This commit is contained in:
Vincent Langlet
2019-01-26 13:27:05 +01:00
committed by GitHub
parent daac60683d
commit fba358da45

View File

@@ -868,10 +868,10 @@ function ReactWrapperTest() {
function test_component_type() {
const wrapper1 = shallow(<div><ComponentType stringProp={"S"} numberProp={1} /></div>);
wrapper1.find(ComponentType).props().stringProp; // $ExpectType string
wrapper1.find<MyComponentProps>(ComponentType).props().stringProp; // $ExpectType string
const wrapper2 = mount(<div><ComponentType stringProp={"S"} numberProp={1} /></div>);
wrapper2.find(ComponentType).props().stringProp; // $ExpectType string
wrapper2.find<MyComponentProps>(ComponentType).props().stringProp; // $ExpectType string
}
}