Skip to content

How to filter request body #6

@iPrime

Description

@iPrime

Hi PortBlueSky,

Loving the abstraction of nock! However, I'm trying to nock a request that is done by an SDK that generates a job.id locally and returns this job.id in the request. Since this job.id is a random string generated on each request, nock is unable to match the request to the recorded nocks.

nock itself has a .filteringRequestBody(...) method to solve this. How can I apply it using the jest-nock package?

See (https://github.com/nock/nock#request-body-filtering)

Thanks in advance!

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