Skip to content

Error: Nock: No match for request #1048

@RichardWatkins1

Description

@RichardWatkins1

I have spec which makes a post request e.g:

const emailRequest = nock('https://emailhost.com')
                                       .post('/api/email/abc-123-def/send', {
                                         'To': ['to@example.com'],
                                         'Data': {
                                           'id': '227',
                                          }
                                      })

This is just example data but running nock version < 9 the spec passes, > 9 it fails with the error message An error occurred: { Error: Nock: No match for request { ....

This is seems to be with the body as I have specs that pass if I remove the body when using version > 9.

Has anyone else come across this issue or is there anything I need to do differently with the body between versions 8 and 9?.

I am using "request": "^2.83.0" to make the request in my code and running "jasmine": "^2.8.0".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions