FAQ Database Discussion Community

Mocha Test: Uncaught TypeError: Cannot read property 'status' of null

Learning TDD and my first simple test for my "Hello World" server response is failing in Mocha. I'm using Mocha.js, Superagent, & Expect.js. When I curl -i localhost:8080, I get the correct response and status code. HTTP/1.1 200 OK Content-Type: text/plain Date: Mon, 27 Apr 2015 17:55:36 GMT Connection: keep-alive...

Socket.IO server not receiving message from client

I'm playing around with Node, Socket.IO and BDD by creating a chat application. During one of the tests, I get a timeout error stating: Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test. The affected test is it('#must be able to receive a message',...