You are calling done() before all tests have been evaluated, in fact even before you get the result for the requested URL. You need to move the done() call inside the .end callback. I would show you how if you pasted your code. But perhaps it's already clear from this description.
You are calling
done()before all tests have been evaluated, in fact even before you get the result for the requested URL. You need to move thedone()call inside the.endcallback. I would show you how if you pasted your code. But perhaps it's already clear from this description.