From 022a2b1adef8417048f235a0e037c4332abacd84 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Wed, 15 Jul 2015 09:37:25 +0100 Subject: [PATCH] Ensure test coverage of overlayWith error paths --- test/unit/overlay.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/unit/overlay.js b/test/unit/overlay.js index 82641e91..9eff6dc3 100755 --- a/test/unit/overlay.js +++ b/test/unit/overlay.js @@ -161,4 +161,15 @@ describe('Overlays', function() { }); }); + it('Fail with empty String parameter', function() { + assert.throws(function() { + sharp().overlayWith(''); + }); + }); + + it('Fail with non-String parameter', function() { + assert.throws(function() { + sharp().overlayWith(1); + }); + }); });