Skip to content

Commit cccd1e2

Browse files
committed
fix(pagination): Add missing expects
1 parent 744aaaf commit cccd1e2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/module/src/Hooks/pagination.test.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,19 @@ describe('useDataViewPagination', () => {
8484
})
8585
);
8686

87+
expect(mockSetSearchParams).toHaveBeenNthCalledWith(
88+
1,
89+
new URLSearchParams('page=1&perPage=5')
90+
);
91+
8792
act(() => {
8893
result.current.onSetPage(undefined, 4);
8994
});
9095

91-
expect(mockSetSearchParams).toHaveBeenCalledTimes(2);
96+
expect(mockSetSearchParams).toHaveBeenNthCalledWith(
97+
2,
98+
new URLSearchParams('page=4')
99+
);
92100
});
93101

94102
it('should set pagination state in URL when perPage changes', () => {

0 commit comments

Comments
 (0)