mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-11 19:00:00 +01:00
* Fixed - move module tests into separate test files #141 * Modification * Restructure, fixed tests
This commit is contained in:
committed by
Jeffrey Warren
parent
c19a663fa2
commit
38accebcc3
25
test/modules/replace.js
Normal file
25
test/modules/replace.js
Normal file
@@ -0,0 +1,25 @@
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs');
|
||||
var test = require('tape');
|
||||
|
||||
require('../../src/ImageSequencer.js');
|
||||
|
||||
var sequencer = ImageSequencer({ ui: false });
|
||||
var red = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAAQABADASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAf/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFQEBAQAAAAAAAAAAAAAAAAAABgj/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCdABykX//Z";
|
||||
|
||||
if(typeof(document) !== "undefined") {
|
||||
var image = document.createElement("img");
|
||||
image.src = red;
|
||||
document.body.appendChild(image);
|
||||
}
|
||||
|
||||
test('replaceImage works.', function (t){
|
||||
if (typeof(document) === "undefined")
|
||||
t.end();
|
||||
|
||||
sequencer.replaceImage("img","invert",{ callback: function(){
|
||||
t.equal(0,0, "replaceImage works");
|
||||
t.end();
|
||||
} });
|
||||
});
|
||||
Reference in New Issue
Block a user