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

fix(createInstantSearch): remove the client from the Snapshot #749

Merged
merged 2 commits into from
Dec 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, makes sense to not have the version number in the tests

],
],
},
},
"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