-
Notifications
You must be signed in to change notification settings - Fork 49.9k
Closed
Description
Bug
What is the current behavior?
I can't call findByType() on an instance
TypeError: instance.findByType is not a function
140 |
141 | let instance = testRenderer.getInstance();
> 142 | let fieldMapper = instance.findByType(FieldMapper)
What is the expected behavior?
I want to get FieldMapper componen which is a child of FieldMapping
This is the peace of code from the test
testRenderer = create(
<Provider store={store}>
<FieldMapping
setStage={(stage: number) => { }}
spDataProvider={null}
msFlowApprovalUrl=""
></FieldMapping>
</Provider>
);
let instance = testRenderer.getInstance();
let fieldMapper = instance.findByType(FieldMapper)
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React 15.6.2
react-test-renderer 15.6.2
Typescript 2.4.2
@types/react-test-renderer 16.0.0
Metadata
Metadata
Assignees
Labels
No labels