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

Conversation

samouss
Copy link
Collaborator

@samouss samouss commented Dec 20, 2017

Summary

With jest@22 the mock function are now print with the snapshot.

So when we call createInstantSearch from the test, we provide a mock client with the current version of the lib. We already test that the instance is called with the correct client (see below). So we don't need to print the client mock in the snapshot. It will avoid that every time we release a new version we have to fix the snapshot, just because the version bump.

https://github.com/algolia/react-instantsearch/pull/749/files#diff-89fda296b36d39c13ca0e69ebdb33163R34

@samouss samouss requested review from vvo and Haroenv December 20, 2017 10:15
@algobot
Copy link
Contributor

algobot commented Dec 20, 2017

Deploy preview ready!

Built with commit 9b633b6

https://deploy-preview-749--react-instantsearch.netlify.com

"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

@samouss samouss merged commit 700d8f4 into master Dec 20, 2017
@samouss samouss deleted the fix/snapshot-with-version branch December 20, 2017 11:04
samouss added a commit that referenced this pull request Jan 3, 2018
<a name="4.4.0"></a>

* **createInstantSearch:** remove the client from the Snapshot ([#749](#749)) ([700d8f4](700d8f4))
* refresh cache memory leak example ([#784](#784)) ([cf228ac](cf228ac))
* **stories:** rename InstantSearch to <InstantSearch> ([#789](#789)) ([05efda5](05efda5))

* InstantSearch root props ([#770](#770)) ([2d458f8](2d458f8))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants