Skip to content

Commit

Permalink
more correct mock
Browse files Browse the repository at this point in the history
  • Loading branch information
Haroenv committed Apr 24, 2020
1 parent 5938969 commit 377d5a3
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test/mock/createInstantSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,17 @@ export const createInstantSearch = (
const mainHelper = algoliasearchHelper(searchClient, indexName, {});
const mainIndex = index({ indexName });

let started = false;

return {
indexName,
mainIndex,
mainHelper,
client: searchClient,
started,
start: () => {
started = true;
started: false,
start() {
this.started = true;
},
dispose: () => {
started = false;
dispose() {
this.started = false;
},
refresh: jest.fn(),
helper: mainHelper, // @TODO: use the Helper from the index once the RoutingManger uses the index
Expand Down

0 comments on commit 377d5a3

Please sign in to comment.