Quality Assurance and Testing with Chai - Run Functional Tests on an API Response using Chai-HTTP IV - PUT method

Hey there.
My website doesnt work after i get this code in but i dont know why. Everything up to this Challange is working but here Replit cant open the website. Can someone help me.

    test('Send {surname: "da Verrazzano"}', function (done) {
      chai.request(server)
      .put('/travellers')
      .send({surname: 'da Verrazzano'})
      .end((err, res) =>{
        assert.equal(res.status, 200);
        assert.equal(res.type, 'application/json')
        assert.equal(res.body.name, 'Giovanni')
        assert.equal(res.body.surname, 'da Verrazzano')
      })
      done();
    });

Your project link(s)

solution: https://boilerplate-mochachai-2--sinanoksuz.repl.co

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0

Challenge: Quality Assurance and Testing with Chai - Run Functional Tests on an API Response using Chai-HTTP IV - PUT method

Link to the challenge:


Your test works well for me, and the page is displayed either way.

Did the problem occur when you first added the test or it couldn’t be shown from the beginning?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.