Add hasNextPage to pagination

This commit is contained in:
Sam Carlton 2022-05-20 14:39:09 -05:00
parent e4ab3384eb
commit f838955dc3
2 changed files with 8 additions and 0 deletions

View file

@ -193,11 +193,13 @@ test('Can paginate', async (t) => {
pages: [
{
number: 1,
hasNextPage: true,
items: [1, 2],
json: '[1,2]'
},
{
number: 2,
hasNextPage: true,
items: [3, 4],
json: '[3,4]'
},
@ -205,6 +207,7 @@ test('Can paginate', async (t) => {
// Last page should have less than perPage items
{
number: 5,
hasNextPage: false,
items: [9],
json: '[9]'
}