diff --git a/test/core/modules/blend.js b/test/core/modules/blend.js index 3e738684..de711378 100644 --- a/test/core/modules/blend.js +++ b/test/core/modules/blend.js @@ -30,7 +30,7 @@ test('blend module loads with correct options', t => { }); test('blend module works correctly', t => { - sequencer.run({mode: 'test'}, () => { + sequencer.run(() => { let result = sequencer.steps[2].output.src; diff --git a/test/core/modules/canvas-resize.js b/test/core/modules/canvas-resize.js index 8ee04650..fe06e62f 100644 --- a/test/core/modules/canvas-resize.js +++ b/test/core/modules/canvas-resize.js @@ -23,7 +23,7 @@ test('Check Options', function(t) { // Test 3 to check brightness module works as expected test('canvas-resize module works correctly', function(t) { - sequencer.run({ mode: 'test' }, function(out) { + sequencer.run(function(out) { var result = sequencer.steps[1].output.src; require('get-pixels')(result, (err, pix) => { t.equal(pix.shape[0], 500); diff --git a/test/core/modules/decode-qr.js b/test/core/modules/decode-qr.js index e977d58c..7b211199 100644 --- a/test/core/modules/decode-qr.js +++ b/test/core/modules/decode-qr.js @@ -14,7 +14,7 @@ test('Load Decode-Qr module', function(t) { }); test('Decode-qr module works correctly', function(t) { - sequencer.run({ mode: 'test' }, function(out) { + sequencer.run(function(out) { var result = sequencer.steps[1].options.step.qrval; t.equal(result, 'http://github.com/publiclab/image-sequencer', 'should be equal'); t.end(); diff --git a/test/core/modules/invert.js b/test/core/modules/invert.js index fb3200ca..95130a4f 100644 --- a/test/core/modules/invert.js +++ b/test/core/modules/invert.js @@ -28,7 +28,7 @@ test('Load invert module', function(t) { }); test('Inverted image isn\'t identical', function(t) { - sequencer.run({ mode: 'test' }, function(out) { + sequencer.run(function(out) { var input = sequencer.steps[0].output.src; var output = sequencer.steps[1].output.src; input = DataURItoBuffer(input); @@ -40,7 +40,7 @@ test('Inverted image isn\'t identical', function(t) { // test("Twice inverted image is identical to original image", function(t) { // sequencer.addSteps('test','invert'); -// sequencer.run({ mode: 'test' }, function(out) { +// sequencer.run(function(out) { // var input = sequencer.steps[0].output.src // var output = sequencer.steps[2].output.src // base64Img.imgSync(input, target, 'input') @@ -56,7 +56,7 @@ test('Inverted image isn\'t identical', function(t) { // }); test('Invert module produces correct output', function(t) { - sequencer.run({ mode: 'test' }, function(out) { + sequencer.run(function(out) { var result = sequencer.steps[1].output.src; var benchmark = invert; base64Img.imgSync(result, target, 'result'); diff --git a/test/core/modules/text-overlay.js b/test/core/modules/text-overlay.js index 1d8521ce..761eba0f 100644 --- a/test/core/modules/text-overlay.js +++ b/test/core/modules/text-overlay.js @@ -25,7 +25,7 @@ test('Check Options', function(t) { // Test 3 to check Text Overlay module works as expected. // test('Text Overlay module works correctly', function(t) { -// sequencer.run({ mode: 'test' }, function(out) { +// sequencer.run(function(out) { // // The test runs in node , and the text overlay is a browser only module, // // thus it there is no image processing and output is same as input. // var result = sequencer.steps[1].output.src; diff --git a/test/core/sequencer/image-sequencer.js b/test/core/sequencer/image-sequencer.js index ad56be5d..bd6d4141 100644 --- a/test/core/sequencer/image-sequencer.js +++ b/test/core/sequencer/image-sequencer.js @@ -175,7 +175,7 @@ test('getSteps() returns correct array of steps', function(t){ }); test('run() runs the sequencer and returns output to callback', function(t) { - sequencer.run({ mode: 'test' }, function(out) { + sequencer.run(function(out) { t.equal(typeof (sequencer.steps[sequencer.steps.length - 1].output), 'object', 'Output is Generated'); t.equal(out, sequencer.steps[sequencer.steps.length - 1].output.src, 'Output callback works'); t.end(); @@ -185,7 +185,7 @@ test('run() runs the sequencer and returns output to callback', function(t) { test('getStep(offset) returns the step at offset distance relative to current step', function(t) { sequencer.addSteps('invert', {}); sequencer.addSteps('blend', {}); - sequencer.run({ mode: 'test' }, function(out) { + sequencer.run(function(out) { t.equal(!!out, true, 'Blend generates output'); t.end(); }); @@ -202,7 +202,7 @@ test('blend returns different output depending on the set offset', function(t) { sequencer.addSteps('blend', {}); // because we've added blend before, so instead of -3 we set it to -4 sequencer.addSteps('blend', {'offset': -4}); - sequencer.run({ mode: 'test' }, function(out) { + sequencer.run(function(out) { t.notStrictEqual(out, sequencer.steps[sequencer.steps.length - 2].output.src, 'different offsets give different output'); t.end(); }); diff --git a/test/core/templates/options-test.js b/test/core/templates/options-test.js index 377b25c5..c1f72d98 100644 --- a/test/core/templates/options-test.js +++ b/test/core/templates/options-test.js @@ -25,7 +25,7 @@ module.exports = (moduleName, options, benchmark, input) => { // Add the step. sequencer.addSteps(moduleName, options[0]); // Run the ImageSequencer with initial option. - sequencer.run({ mode: 'test' }, () => { + sequencer.run(() => { let result = sequencer.steps[1].output.src; base64Img.imgSync(result, target, 'result'); @@ -42,7 +42,7 @@ module.exports = (moduleName, options, benchmark, input) => { // Change the option of the given module. sequencer.steps[1].setOptions(options[1]); // Run the ImageSequencer witch changed option. - sequencer.run({ mode: 'test' }, () => { + sequencer.run(() => { let newResult = sequencer.steps[1].output.src; base64Img.imgSync(newResult, target, 'newResult');