Skip to content

Allow to specify request body on serverMock #50

@josemarluedke

Description

@josemarluedke

Server mocks are great! I have already been using it and works nicely.

I'm using it to mock a GraphQL server. While it has been working fine for my set of simple tests, for me to be able to use it further, I would need to be able to mock requests on the same path but differentiate it on the request body.

It seems that nock does support this use case: https://github.com/nock/nock#specifying-request-body

Note that all requests to a GraphQL server are POST methods.

Supporting request body as String, RegExp and JSON object should do the trick.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions