I have a node.js module that HTTP POSTs a JSON request,
I want to test for correct url, headers, request body and that the request is actually executed.
I'm using Mocha for a testing framework. how do I test it ?
You can use nock. you can intercept the http request and with certain properties
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With