This is an asynchronous call, correct? So the test will only be over when the postJSON function calls the callback. We should call done() inside the callback function