diff --git a/src/__tests__/use-double-click.test.js b/src/__tests__/use-double-click.test.js index d7c9da0..49571be 100644 --- a/src/__tests__/use-double-click.test.js +++ b/src/__tests__/use-double-click.test.js @@ -36,6 +36,21 @@ test('calls "onDoubleClick" callback on double click', async () => { expect(onDoubleClick).toHaveBeenCalledTimes(1); }); +test('calls "onDoubleClick" callback on double click despite rerender between clicks', async () => { + const onDoubleClick = jest.fn(); + const { getByText, rerender } = render( +