From 908383966777a3453a979417db804f37122a40b5 Mon Sep 17 00:00:00 2001 From: Zach Bjornson Date: Mon, 7 Dec 2015 11:26:32 -0800 Subject: [PATCH] Fix server tests in cases when jpeg isn't available --- test/server.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/server.js b/test/server.js index 5c6d1f6..b801daf 100644 --- a/test/server.js +++ b/test/server.js @@ -84,6 +84,8 @@ app.post('/pdf', function(req, res, next){ }); app.post('/jpeg', function(req, res, next){ + // Send nothing if jpeg isn't available. + if (!Canvas.jpegVersion) { return res.send({}).end(); } var fn = testFn(req) , canvas = createCanvas(req) , ctx = canvas.getContext('2d');