Skip to content

MockServerClient.clearById typescript definition incorrect #158

@forktrucka

Description

@forktrucka

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions