mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-12 11:20:02 +01:00
* default sequencer ui test * default step ui test suite * intermediate step ui test * preview ui test suite * url methods test suite * add set url params method test suite * argument call tests * test directory refactor * travis fix
19 lines
1.0 KiB
JavaScript
19 lines
1.0 KiB
JavaScript
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";
|
|
|
|
test('Dynamically add a test Module', function(t) {
|
|
sequencer.loadNewModule('test', { func: require('./testModule/Module'), info: require('./testModule/info') });
|
|
sequencer.loadImages('image1', red);
|
|
t.deepEqual(sequencer.modules['test'], [
|
|
require('./testModule/Module'),
|
|
require('./testModule/info')
|
|
], "test module was succesfully imported");
|
|
sequencer.addSteps('invert');
|
|
sequencer.addSteps('test');
|
|
sequencer.addSteps('invert');
|
|
sequencer.run();
|
|
t.end();
|
|
}); |