From 8ccb0d93cdc064776454c929e15aa03129be37a3 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Fri, 11 May 2018 10:46:24 -0400 Subject: clean up --- frontend/__tests__/Pagination.test.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'frontend/__tests__/Pagination.test.js') 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}` })), }, }, -- cgit v1.3