Open Artem-Tsymbal opened 2 years ago
Hello, could anybody help me to solve my error
I have the same problem {"error":"Mock not found"}
I also got {"error":"Mock not found"}
because the mock received a request that doesn't match any resolver function that I set up. In my case, I didn't pay close attention to the fact that my application code was hitting ElasticSearch with a POST request and I had set up the mock resolver with method: 'GET'
like in the code examples.
It would be nice for this error to show what request was made. This way we could more easily create the correct handler.
"@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]