About 3,050,000 results
Open links in new tab
  1. unit testing - Jest and HTTP mocking with nock - Stack Overflow

    Sep 9, 2021 · Jest and HTTP mocking with nock Asked 4 years ago Modified 4 years ago Viewed 15k times

  2. node.js - Error: Nock: No match for request - Stack Overflow

    Feb 8, 2018 · You'll need to complete a few actions and gain 15 reputation points before being able to upvote. Upvoting indicates when questions and answers are useful. What's reputation …

  3. How to see if nock is matching the request or not?

    Mar 1, 2019 · Basically, nock checks all the interceptors it has active until a match is found for your request (in case you have multiple nock interceptors mocking a variety of requests). So …

  4. Node.js Nock simulate request timeout and subsequent success

    Node.js Nock simulate request timeout and subsequent success Asked 10 years, 2 months ago Modified 10 years, 2 months ago Viewed 13k times

  5. javascript - Why is nock matching request when body, time and …

    You need to specify a body in your nock object otherwise nock will just intercept it based on the URL and verb. As per the official nock documentation, a body must be specified in order to be …

  6. node.js - How to send multiple response using nock if there is no ...

    Mar 9, 2022 · If you have multiple tests that require the same nock response and don't want to keep writing the code, I'd put those all in a describe ('200 response') block, put the nock call in …

  7. node.js - How to do subsequent calls on same url via Nock having ...

    Mar 5, 2019 · How to do subsequent calls on same url via Nock having different status code Asked 6 years, 7 months ago Modified 6 years, 7 months ago Viewed 11k times

  8. Mocking NodeJS request and response with Nock - Stack Overflow

    If I comment the nock section or change: .reply(200, getIssueResponse) to .reply(404) It doesn't break the test and nothing change, I'm not doing anything with my nock variable. Can …

  9. How to use nock to intercept requests regardless of body

    Jun 5, 2019 · 1 I'm trying to use nock in my tests to intercept the request calls i'm making from the native https module in Node.js. I'm using Promise.all to make two requests to the external …

  10. node.js - nock is not intercepting my request - Stack Overflow

    Jun 6, 2016 · I'm trying to create some basic tests using karma server and nock. It seems like nock is not intercepting my requests at all, does anyone have idea? I can't figure out what is …