Quality Assurance and Testing with Chai - Run Functional Tests on an API Response using Chai-HTTP III - PUT method
I am unable to pass the overall test but all of the individual test cases are getting passed.
Here is my code:
test('send {surname: "Colombo"}', function(done){
// we setup the request for you...
chai.request(server)
.put('/travellers')
/** send {surname: 'Colombo'} here **/
// .send({...})
.end(function(err, res){
/** your tests here **/
assert.equal(res.status, 200);
assert.equal(res.type, 'application/json');
assert.equal(res.body.name, 'Cristoforo');
assert.equal(res.body.surname, 'Colombo');
done(); // Never forget the 'done()' callback...
});
});
Getting this output:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
.
Link to the challenge: