Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
fix(createInstantSearch): remove the client from the Snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
samouss committed Dec 20, 2017
1 parent 8fb5ae7 commit 094720e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@

exports[`createInstantSearch wraps InstantSearch 1`] = `
Object {
"algoliaClient": Object {
"addAlgoliaAgent": [MockFunction] {
"calls": Array [
Array [
"react-instantsearch 4.3.0-beta.0",
],
],
},
},
"children": undefined,
"createURL": undefined,
"indexName": "name",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ describe('createInstantSearch', () => {
const wrapper = shallow(
<CustomInstantSearch appId="app" apiKey="key" indexName="name" />
);

// eslint-disable-next-line no-shadow
const { algoliaClient, ...propsWithoutClient } = wrapper.props();

expect(wrapper.is(InstantSearch)).toBe(true);
expect(wrapper.props()).toMatchSnapshot();
expect(propsWithoutClient).toMatchSnapshot();
expect(wrapper.props().algoliaClient).toBe(algoliaClient);
});

Expand Down

0 comments on commit 094720e

Please sign in to comment.