Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MockServerClient.clearById typescript definition incorrect #158

Open
forktrucka opened this issue Jan 4, 2023 · 0 comments
Open

MockServerClient.clearById typescript definition incorrect #158

forktrucka opened this issue Jan 4, 2023 · 0 comments

Comments

@forktrucka
Copy link

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

  1. How you are running MockServer
    Docker

  2. Code you used to create expectations

const client = mockServerClient(mockServerHost, mockServerPort);
const value = await client.mockAnyResponse();
client.clearById({ id: value[0].id },"ALL");
  1. What error you saw

image

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.

image

image

MockServer Log
See above

botflux added a commit to botflux/mockserver-client-node that referenced this issue May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant