Why i don't pass the test?

Hi, i’m studying this lesson, to solve the exercise i wrote this code on my replit’s app:

 // #4
  test('Send {surname: "da Verrazzano"}', function(done) {

    .send({ surname: 'da Verrazzano' })
    .end(function(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');


but i don’t pass any test, can you help me please? i don’t know really where it’s wrong

Can you please post the link to your Replit so that we can test from our end?

1 Like

Here it’s, i think it should be a bug

I found the root cause of your tests not passing issue. I forked your code here: fcc-mochachai-guiseppe-forked, and the only line I added is the }); to terminate the test suite suite(‘Functional Tests’).

Below is the screen capture of the console right after I forked your code, and it states there is an unexpected end of input:

Here’s the functional test suite after I have updated the indentation and added the last line to terminate the functional test suite. Notice how much easier it is to spot the missing }) once the indentations have been updated.

Here’s the test result in the console:


Here’s the test from the client/fCC side:

Thank you, test passed :slightly_smiling_face: