Is there any unit test example when using elasticsearch Search UI libraries? I need help when try to mock ElasticSearchAPIConnector., wondering any examples that I can learn?
Thanks!
Sheng
Is there any unit test example when using elasticsearch Search UI libraries? I need help when try to mock ElasticSearchAPIConnector., wondering any examples that I can learn?
Thanks!
Sheng
You can look at the unit tests within search-ui for ElasticsearchAPIConnector.
Elasticsearch connector uses Searchkit so our unit tests just jest mock it. You can see an example here search-ui/index.test.ts at main · elastic/search-ui · GitHub
Searchkit mocks the network request to Elasticsearch. searchkit/index.test.ts at main · searchkit/searchkit · GitHub
Hope this helps!
Great! Thanks Joseph for the help, very helpful examples!
Sheng
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.