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 (#749)
Browse files Browse the repository at this point in the history
* fix(recipes): update Snapshot

* fix(createInstantSearch): remove the client from the Snapshot
  • Loading branch information
samouss authored Dec 20, 2017
1 parent 8fb5ae7 commit 700d8f4
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ exports[`geo-search recipe App renders without crashing 1`] = `
/>
<button
className="ais-SearchBox__submit"
hidden={false}
title="Submit your search query."
type="submit"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ exports[`Multi index recipe App renders without crashing 1`] = `
/>
<button
className="ais-SearchBox__submit"
hidden={false}
title="Submit your search query."
type="submit"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ exports[`Next app recipes App renders without crashing 1`] = `
/>
<button
className="ais-SearchBox__submit"
hidden={false}
title="Submit your search query."
type="submit"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ exports[`react-router recipe App renders without crashing 1`] = `
/>
<button
className="ais-SearchBox__submit"
hidden={false}
title="Submit your search query."
type="submit"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ exports[`react-router recipe App renders without crashing 1`] = `
/>
<button
className="ais-SearchBox__submit"
hidden={false}
title="Submit your search query."
type="submit"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ exports[`Server-side rendering recipes App renders without crashing 1`] = `
/>
<button
className="ais-SearchBox__submit"
hidden={false}
title="Submit your search query."
type="submit"
>
Expand Down
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 700d8f4

Please sign in to comment.