diff --git a/src/hook/index.test.tsx b/src/hook/index.test.tsx index 8c7b838..67d5ee1 100644 --- a/src/hook/index.test.tsx +++ b/src/hook/index.test.tsx @@ -58,6 +58,12 @@ describe('useBottomScrollListener', () => { expect(onBottom).toHaveBeenCalledTimes(1); }); + + it('shall invoke onBottom when there is no place to scroll with triggerOnNoScroll true', () => { + const onBottom = jest.fn(); + renderHook(() => useBottomScrollListener(onBottom, { triggerOnNoScroll: true })); + expect(onBottom).toHaveBeenCalledTimes(1); + }); }); describe('given a ref it should use the given ref and', () => {