diff --git a/packages/react-dom/src/__tests__/ReactTestUtils-test.js b/packages/react-dom/src/__tests__/ReactTestUtils-test.js index 8b1bccac4416a..1b7eb608e5158 100644 --- a/packages/react-dom/src/__tests__/ReactTestUtils-test.js +++ b/packages/react-dom/src/__tests__/ReactTestUtils-test.js @@ -503,4 +503,19 @@ describe('ReactTestUtils', () => { ReactTestUtils.renderIntoDocument(); expect(mockArgs.length).toEqual(0); }); + it('should find rendered component with type in document', () => { + class MyComponent extends React.Component { + render() { + return true; + } + } + + const instance = ReactTestUtils.renderIntoDocument(); + const renderedComponentType = ReactTestUtils.findRenderedComponentWithType( + instance, + MyComponent, + ); + + expect(renderedComponentType).toBe(instance); + }); });