diff --git a/packages/react-test-renderer/src/__tests__/ReactShallowRendererHooks-test.js b/packages/react-test-renderer/src/__tests__/ReactShallowRendererHooks-test.js index 6b8a962ad5b14..26c5940ba65e0 100644 --- a/packages/react-test-renderer/src/__tests__/ReactShallowRendererHooks-test.js +++ b/packages/react-test-renderer/src/__tests__/ReactShallowRendererHooks-test.js @@ -290,6 +290,22 @@ describe('ReactShallowRenderer with hooks', () => { expect(firstResult).toEqual(secondResult); }); + it('should work with useCallback', () => { + function SomeComponent() { + const noop = React.useCallback(() => {}, []); + + return ( +
+ ); + } + + const shallowRenderer = createRenderer(); + let firstResult = shallowRenderer.render(