Monday, 12 June 2017

Node JS testing request() https

I have a Node JS code that validates if a request is secured or not (req.secure) and according to that executes some procedures

I need to write a unit testing in order to validate this functionality, how can I emulate an HTTPS request in order to trigger the functionalities that relies on a secure request?

Right now I'm accessing functions by this way:

request(app)
            .get('/something')
            .expect('status', 200, done);



via Pablo Gaviria

No comments:

Post a Comment