# Is there javascript/nodejs version of UT test class or framework for ES?

**URL:** <https://discuss.elastic.co/t/is-there-javascript-nodejs-version-of-ut-test-class-or-framework-for-es/113164>\
**Category:** Elasticsearch\
**Created:** [December 26, 2017, 2:47am UTC](https://discuss.elastic.co/t/is-there-javascript-nodejs-version-of-ut-test-class-or-framework-for-es/113164 "2017-12-26T02:47:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Faye](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/faye/32/9190_2.png) [@Faye](https://discuss.elastic.co/u/Faye)\
**Post date:** [December 26, 2017, 2:47am UTC](https://discuss.elastic.co/t/is-there-javascript-nodejs-version-of-ut-test-class-or-framework-for-es/113164/1 "2017-12-26T02:47:57Z")

</div>

Is there any nodejs or javascript version of Elasticsearch unit test class or framework ?  
Our code is to connect to ES, in UT, we stop ES to run test , I found there is java version of test framework Client [https://www.elastic.co/guide/en/elasticsearch/reference/current/testing-framework.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/testing-framework.html) , I also found a personal UT class written in java [https://github.com/sgmarghade/mock-elasticsearch-server/blob/master/src/main/java/com/sgmarghade/elasticsearchmock/MockElasticsearchServer.java](https://github.com/sgmarghade/mock-elasticsearch-server/blob/master/src/main/java/com/sgmarghade/elasticsearchmock/MockElasticsearchServer.java)

```auto
        node = nodeBuilder()
                .local(true)
                .settings(elasticsearchSettings.build())
                .node();
    }

    public void refresh(final String index) {
        node.client().admin().indices().refresh(new RefreshRequest().indices(index)).actionGet();
    }

```

The node.client() is connecting to a jvm level ES , it can be used in UT . I just wonder whether there is nodejs/javascript version of UT test class like this ? Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 23, 2018, 2:48am UTC](https://discuss.elastic.co/t/is-there-javascript-nodejs-version-of-ut-test-class-or-framework-for-es/113164/2 "2018-01-23T02:48:13Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
