mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-11 19:00:00 +01:00
* change all old module benchmarks * no node 6 * add average module tests * edge-detect test added * edge detect tests * flip-image tests * tint tests * saturation tests * gradient tests * exposure tests * draw-rectangle tests * color-temperature tests * convolution tests * paint-bucket tests * ndvi tests * ndvi-colormap tests * histogram tests * crop tests * gamma-correction tests * dynamic tests * colorbar tests * webgl-distort tests * fisheye-gl tests * blend module tests * overlay module tests
26 lines
965 B
JavaScript
26 lines
965 B
JavaScript
'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(window) !== "undefined") {
|
|
var image = document.createElement("img");
|
|
image.src = red;
|
|
document.body.appendChild(image);
|
|
}
|
|
|
|
test('replaceImage works.', function (t){
|
|
if (typeof(window) === "undefined")
|
|
t.end();
|
|
|
|
sequencer.replaceImage("img","invert",{ callback: function(){
|
|
t.equal(0,0, "replaceImage works");
|
|
t.end();
|
|
} });
|
|
});
|