elasticsearch-js-mock icon indicating copy to clipboard operation
elasticsearch-js-mock copied to clipboard

Mock utility for the Elasticsearch's Node.js client

Results 17 elasticsearch-js-mock issues
Sort by recently updated
recently updated
newest added

"@elastic/elasticsearch": "^8.1.0", "@elastic/elasticsearch-mock": "^2.0.0", "jest": "^24.9.0", Node: v12.22.7 console.log(mock.getConnection()) -> [class MockConnection extends BaseConnection] ``` console.error node_modules/jest-jasmine2/build/jasmine/Env.js:289 Unhandled error console.error node_modules/jest-jasmine2/build/jasmine/Env.js:290 ResponseError: {"error":"Mock not found"} at SniffingTransport.request (.../node_modules/@elastic/transport/src/Transport.ts:532:17) at Indices.delete...

I'm trying to use this mock to write unit tests for production code that makes calls to elasticsearch. I am struggling to see how the actual production code can be...

Hi, I got a `currentNode.createStaticChild is not a function` from `find-my-way` after upgrading to v2.0. Can check if anyone face the same issue as me?

We have a set of Elasticsearch client unit tests which make use of the mock interface. These tests were previously working using elasticsearch-js-mock v0.3.1 and an old version of Elasticsearchclient...

Hi folks, I'm trying to use this library but I'm seeing the following error. Am I doing something wrong? TypeError: Cannot destructure property 'ConfigurationError' of 'errors' as it is undefined....

When none of your mocks match, it's helpful to see what the actual request was that was made by the client.

Hi, I need to simulate a response or error returned by the mocked cluster with a specific time delay. How to do that? By reading the documentation I didn't found...

Hi there 👋🏻 Elasticsearch mocks don't work with [jest fake timers](https://jestjs.io/docs/timer-mocks) and the jest test runner seems to just time out when I use fake timers To reproduce the issue...

Hi, thanks for this excellent library. I'm trying to mock specific `ResponseError`s in TypeScript but I'm getting stuck. The `ResponseError` constructor takes a huge amount of arguments that I'm unable...

Following [install multiple versions](https://github.com/elastic/elasticsearch-js#install-multiple-versions) I have ``` "dependencies": { "es6": "npm:@elastic/elasticsearch@^6.7.0", "es7": "npm:@elastic/elasticsearch@^7.0.0" } ``` in my package.json However when adding elasticsearch-mock, it uses `require('@elastic/elasticsearch')` for `{ Connection, errors }`...