mockserver-client-node
mockserver-client-node copied to clipboard
MockServerClient.clearById typescript definition incorrect
Describe the issue When using MockServerClient.clearById a rest api error is returned.
What you are trying to do clear an expectation by id
MockServer version 5.14.0
To Reproduce
-
How you are running MockServer Docker
-
Code you used to create expectations
const client = mockServerClient(mockServerHost, mockServerPort);
const value = await client.mockAnyResponse();
client.clearById({ id: value[0].id },"ALL");
- What error you saw

Expected behaviour The expectation is cleared. The typescript definition is expecting an object with an id. However if you check mockServerClient.js it is creating an object and nesting the passed in expectationid and incorrectly creating the request.


MockServer Log See above