Unit Testing ClearRefinement React InstantSearch Component

TLDR alex asked for a guide on unit testing the ClearRefinement React InstantSearch component. Jason suggested they post their question in the Algolia instantsearch Github repo, as the testing method for Algolia will work with typesense-instantsearch-adapter.

Powered by Struct AI
Aug 29, 2022 (16 months ago)
Photo of md5-0dc7ffd31fe74c8940f4a6976fc32045
04:51 PM
Hello team,
About the unit test to fully coverage on ClearRefinement React InstantSearch component via react.js, do you have a guide on doing unit test for typesense/algolia connector-for-typesense for the component above or similar?
I found this but wanted to check on how to do it for ClearRefinement
reference here : https://github.com/algolia/react-instantsearch/issues/1503
Photo of md5-8813087cccc512313602b6d9f9ece19f
04:53 PM
I’m not too familiar with this aspect of react-instantsearch, but the approach they’ve described in that github issue, should be similar for clear refinement as well.

In any case, this is more related to instantsearch than Typesense. The typesense adapter works at a much lower level

So I’d recommend posting this particular question in their Github repo, as any method for unit testing that works with Algolia instantsearch will also work with typesense-instantsearch-adapter