Step 10

Update the following test:

test("Return 200 when authentication is sucessfull", async () => {
  const response = await request.post("/authenticate").send({
    username: "testclient",
    password: "testclient",
  });
  expect(response.status).toBe(200);
});

Save the file and run the tests:

npm run test

You should get an output similar to this:

Before going any further, check you MongoDB cluster and ensure there is no "test client" in there!