From 467fe1d2e57e37d559b30ba0b63841964cb7ae4e Mon Sep 17 00:00:00 2001 From: Chinmay Pandhare Date: Fri, 28 Jul 2017 12:32:29 +0530 Subject: [PATCH] Added Unit Test for URL Support --- test/image-sequencer.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/image-sequencer.js b/test/image-sequencer.js index 4e816905..651e5af3 100644 --- a/test/image-sequencer.js +++ b/test/image-sequencer.js @@ -40,6 +40,15 @@ test('loadImages loads a DataURL image and creates a step.', function (t){ t.end(); }); +if(!sequencer.options.inBrowser) + test('loadImage loads an image from URL and creates a step. (NodeJS)', function (t){ + sequencer.loadImage('URL','https://ccpandhare.github.io/image-sequencer/examples/red.jpg', function(){ + t.equal(sequencer.images.URL.steps.length, 1, "Initial Step Created"); + t.equal(typeof(sequencer.images.URL.steps[0].output.src), "string", "Initial output exists"); + t.end(); + }); + }); + if(!sequencer.options.inBrowser) test('loadImages loads an image from PATH and creates a step. (NodeJS)', function (t){ sequencer.loadImages('examples/red.jpg');