NodeJS/Passport - Testing user login with mocha and superagent
问题 I have built a login process with a basic MEAN stack and using passport for the authentication process. I am trying to set up a test to make sure the login process is working. To do the login part here is the code I used: it ('login', function(done) { agent.post(config.web.vhost + '/login') .send({ email: 'bruce@wayne.inc', password: 'batman' }) .end(function(err, res) { if (err) console.log('error' + err.message); res.should.have.status(200); done(); }); }); I get the following error: no