The test gives time because the request is never sent.
Based on docs, I don't see anything that tells you that you can execute a post simply by passing data to the post function. There should be many assumptions made by the library here, for example. serialization type, headers, etc.
The correct way to execute a POST request with a JSON payload would be:
chai .request('http://localhost:3000') .post('/posts') .send(head) .end((err, res) => { ... });
James source share