Added Unit Test for URL Support

This commit is contained in:
Chinmay Pandhare
2017-07-28 12:32:29 +05:30
parent b59383ce53
commit 467fe1d2e5

View File

@@ -40,6 +40,15 @@ test('loadImages loads a DataURL image and creates a step.', function (t){
t.end(); 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) if(!sequencer.options.inBrowser)
test('loadImages loads an image from PATH and creates a step. (NodeJS)', function (t){ test('loadImages loads an image from PATH and creates a step. (NodeJS)', function (t){
sequencer.loadImages('examples/red.jpg'); sequencer.loadImages('examples/red.jpg');