I think the tests on QA/Testing are broken

Tell us what’s happening:
My code is only failing the test that says that the code should pass all tests
all of the other tests are passing.

Your code so far

// #3
    test('send {surname: "Colombo"}', function (done) {

        .end(function (err, res) {
          assert.equal(res.status, 200, 'response should be 200');
          assert.equal(res.type, 'application/json', 'type should be application/json');
          assert.equal(res.body.name, 'Cristoforo', 'body.name should be \'Cristoforo\'');
          assert.equal(res.body.surname, 'Colombo', 'body.surname should be \'Colombo\'');

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36.

Challenge: Run Functional Tests on an API Response using Chai-HTTP III - PUT method

Link to the challenge:

Hello there,

From what I have seen, this lesson has no issues. In order to help debug, we will have to see all of your code. Would you mind sharing a link to your project code?

However, the next few lessons do have an issue:
Quality Assurance and Testing with Chai - Run Functional Tests using a Headless Browser. I can’t complete this. All tests are failed - General - The freeCodeCamp Forum

The PR to fix has been accepted, but is not on production yet.

Also, watch where you are calling the callback done :wink:


done being called inside the end function seemed to be the problem. Not sure why it still passed all tests other than the must pass all tests requirement though.

Hello, I think you forgot to alter .send method.