elastic / elasticsearch-js-mock

Mock utility for the Elasticsearch's Node.js client
https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/client-testing.html
Apache License 2.0
46 stars 10 forks source link

Clear mocks #12

Closed Jacse closed 4 years ago

Jacse commented 4 years ago

It's very useful to clear mocks completely between different unit tests. Is there any way to do that currently?

delvedor commented 4 years ago

Hello! Currently, it's not possible, but it would be a nice feature! It should be simple enough to implement, as the router does have a method for deregistering the routes. Would you like to work on it? :)