mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-12 03:10:03 +01:00
Restructure API (#824)
* Change addsteps(), loadImages(), run() and default UI * Restructure API completely * Add updated dist files * Removed extra comments * Indentation improved * Update README.md
This commit is contained in:
committed by
Jeffrey Warren
parent
3d1bbe5940
commit
2f21bec80a
@@ -12,22 +12,22 @@ var benchmark = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6m
|
||||
|
||||
// Test 1 to check brightness module is getting loaded
|
||||
test('Load brightness module', function(t) {
|
||||
sequencer.loadImages('test', red);
|
||||
sequencer.loadImages(red);
|
||||
sequencer.addSteps('brightness', options);
|
||||
t.equal(sequencer.images.test.steps[1].options.name, 'brightness', 'Brightness module is getting loaded');
|
||||
t.equal(sequencer.steps[1].options.name, 'brightness', 'Brightness module is getting loaded');
|
||||
t.end();
|
||||
});
|
||||
|
||||
// Test 2 to check options are correct
|
||||
test('Check Options', function(t) {
|
||||
t.equal(sequencer.images.test.steps[1].options.brightness, 1, 'Options are correct');
|
||||
t.equal(sequencer.steps[1].options.brightness, 1, 'Options are correct');
|
||||
t.end();
|
||||
});
|
||||
|
||||
// Test 3 to check brightness module works as expected
|
||||
test('Brightness module works correctly', function(t) {
|
||||
sequencer.run({ mode: 'test' }, function(out) {
|
||||
var result = sequencer.images.test.steps[1].output.src
|
||||
var result = sequencer.steps[1].output.src
|
||||
base64Img.imgSync(result, target, 'result')
|
||||
base64Img.imgSync(benchmark, target, 'benchmark')
|
||||
result = './test_outputs/result.png'
|
||||
|
||||
Reference in New Issue
Block a user