I am trying to test a post() twice in the same test file. It passes on the first call but fails on the second call with Nock: No match for request POST. Both tests pass individually as well so I am thinking its something with multiple calls to a nock method under the same test.
This is the expected behavior.
See: read-this---about-interceptors
To repeat a response, either specify the number of times:
https://github.com/pgte/nock#repeat-response-n-times
or allow infinite repeated responses:
https://github.com/pgte/nock#persist
This seems to still be an issue with recorded nock.back fixtures, since only 1 copy of each request is saved. How do I fix that?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue and add a reference to this one if it鈥檚 related. Thank you!
Most helpful comment
This is the expected behavior.
See: read-this---about-interceptors
To repeat a response, either specify the number of times:
https://github.com/pgte/nock#repeat-response-n-times
or allow infinite repeated responses:
https://github.com/pgte/nock#persist