summaryrefslogtreecommitdiffstats
path: root/frontend/__tests__/Pagination.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/__tests__/Pagination.test.js')
-rw-r--r--frontend/__tests__/Pagination.test.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/frontend/__tests__/Pagination.test.js b/frontend/__tests__/Pagination.test.js
index 6be60c1..1dbc7b4 100644
--- a/frontend/__tests__/Pagination.test.js
+++ b/frontend/__tests__/Pagination.test.js
@@ -9,7 +9,8 @@ import { ALL_ITEMS_QUERY } from '../queries/queries';
import Router from 'next/router';
-Router.router = { push() {} };
+// mock the router because there isn't really a router instance
+Router.router = { push() {}, prefetch() {} };
function makeMocksFor(length) {
return [
@@ -18,14 +19,12 @@ function makeMocksFor(length) {
result: {
data: {
itemsConnection: {
- // TODO what are these typenames ????
__typename: 'aggregate',
aggregate: {
count: length,
__typename: 'count',
},
},
- // items: [fakeItem()],
items: Array.from({ length }, (_, i) => fakeItem({ id: `item${i}` })),
},
},