From 49cdf9398f08b57d91caec2bbe9ab37534ace2e3 Mon Sep 17 00:00:00 2001 From: Dan Freeman Date: Mon, 19 Sep 2016 16:11:57 -0400 Subject: [PATCH] Fix hang when running in PhantomJS. --- lib/templates/test-body-footer.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/templates/test-body-footer.html b/lib/templates/test-body-footer.html index 573a1ac6..ad75072f 100644 --- a/lib/templates/test-body-footer.html +++ b/lib/templates/test-body-footer.html @@ -12,6 +12,11 @@ request.onload = function() { var data = this.response; + // PhantomJS doesn't honor `responseType = 'json'` + if (typeof data === 'string') { + data = JSON.parse(data); + } + if (!data || !data.total) { return; }