diff options
Diffstat (limited to 'platform/node/test')
-rw-r--r-- | platform/node/test/render.test.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/platform/node/test/render.test.js b/platform/node/test/render.test.js index a4c6448a16..745652567c 100644 --- a/platform/node/test/render.test.js +++ b/platform/node/test/render.test.js @@ -19,7 +19,13 @@ suite.run('native', {tests: tests}, function (style, options, callback) { ratio: options.pixelRatio, request: function(req, callback) { request(req.url, {encoding: null}, function (err, response, body) { - callback(err, {data: body}); + if (err) { + callback(err); + } else if (response.statusCode != 200) { + callback(response.statusMessage); + } else { + callback(null, {data: body}); + } }); } }); |