diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-05-11 10:46:24 -0400 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-05-11 10:46:24 -0400 |
| commit | 8ccb0d93cdc064776454c929e15aa03129be37a3 (patch) | |
| tree | 109dd4fd595f15d25d2b3b27682c776123290ea2 /frontend/__tests__/Pagination.test.js | |
| parent | 632af35d8a0871ca8c1041d0e14d63e2b457d168 (diff) | |
clean up
Diffstat (limited to 'frontend/__tests__/Pagination.test.js')
| -rw-r--r-- | frontend/__tests__/Pagination.test.js | 5 |
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}` })), }, }, |
