Removed all instances of mode: 'test' (#1599)

This commit is contained in:
Deogle
2020-01-31 10:58:12 -05:00
committed by GitHub
parent 5f745ef4bd
commit 600cce0be3
7 changed files with 12 additions and 12 deletions

View File

@@ -30,7 +30,7 @@ test('blend module loads with correct options', t => {
}); });
test('blend module works correctly', t => { test('blend module works correctly', t => {
sequencer.run({mode: 'test'}, () => { sequencer.run(() => {
let result = sequencer.steps[2].output.src; let result = sequencer.steps[2].output.src;

View File

@@ -23,7 +23,7 @@ test('Check Options', function(t) {
// Test 3 to check brightness module works as expected // Test 3 to check brightness module works as expected
test('canvas-resize module works correctly', function(t) { 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; var result = sequencer.steps[1].output.src;
require('get-pixels')(result, (err, pix) => { require('get-pixels')(result, (err, pix) => {
t.equal(pix.shape[0], 500); t.equal(pix.shape[0], 500);

View File

@@ -14,7 +14,7 @@ test('Load Decode-Qr module', function(t) {
}); });
test('Decode-qr module works correctly', 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; var result = sequencer.steps[1].options.step.qrval;
t.equal(result, 'http://github.com/publiclab/image-sequencer', 'should be equal'); t.equal(result, 'http://github.com/publiclab/image-sequencer', 'should be equal');
t.end(); t.end();

View File

@@ -28,7 +28,7 @@ test('Load invert module', function(t) {
}); });
test('Inverted image isn\'t identical', 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 input = sequencer.steps[0].output.src;
var output = sequencer.steps[1].output.src; var output = sequencer.steps[1].output.src;
input = DataURItoBuffer(input); 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) { // test("Twice inverted image is identical to original image", function(t) {
// sequencer.addSteps('test','invert'); // sequencer.addSteps('test','invert');
// sequencer.run({ mode: 'test' }, function(out) { // sequencer.run(function(out) {
// var input = sequencer.steps[0].output.src // var input = sequencer.steps[0].output.src
// var output = sequencer.steps[2].output.src // var output = sequencer.steps[2].output.src
// base64Img.imgSync(input, target, 'input') // 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) { 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 result = sequencer.steps[1].output.src;
var benchmark = invert; var benchmark = invert;
base64Img.imgSync(result, target, 'result'); base64Img.imgSync(result, target, 'result');

View File

@@ -25,7 +25,7 @@ test('Check Options', function(t) {
// Test 3 to check Text Overlay module works as expected. // Test 3 to check Text Overlay module works as expected.
// test('Text Overlay module works correctly', function(t) { // 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, // // 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. // // thus it there is no image processing and output is same as input.
// var result = sequencer.steps[1].output.src; // var result = sequencer.steps[1].output.src;

View File

@@ -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) { 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(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.equal(out, sequencer.steps[sequencer.steps.length - 1].output.src, 'Output callback works');
t.end(); 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) { test('getStep(offset) returns the step at offset distance relative to current step', function(t) {
sequencer.addSteps('invert', {}); sequencer.addSteps('invert', {});
sequencer.addSteps('blend', {}); sequencer.addSteps('blend', {});
sequencer.run({ mode: 'test' }, function(out) { sequencer.run(function(out) {
t.equal(!!out, true, 'Blend generates output'); t.equal(!!out, true, 'Blend generates output');
t.end(); t.end();
}); });
@@ -202,7 +202,7 @@ test('blend returns different output depending on the set offset', function(t) {
sequencer.addSteps('blend', {}); sequencer.addSteps('blend', {});
// because we've added blend before, so instead of -3 we set it to -4 // because we've added blend before, so instead of -3 we set it to -4
sequencer.addSteps('blend', {'offset': -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.notStrictEqual(out, sequencer.steps[sequencer.steps.length - 2].output.src, 'different offsets give different output');
t.end(); t.end();
}); });

View File

@@ -25,7 +25,7 @@ module.exports = (moduleName, options, benchmark, input) => {
// Add the step. // Add the step.
sequencer.addSteps(moduleName, options[0]); sequencer.addSteps(moduleName, options[0]);
// Run the ImageSequencer with initial option. // Run the ImageSequencer with initial option.
sequencer.run({ mode: 'test' }, () => { sequencer.run(() => {
let result = sequencer.steps[1].output.src; let result = sequencer.steps[1].output.src;
base64Img.imgSync(result, target, 'result'); base64Img.imgSync(result, target, 'result');
@@ -42,7 +42,7 @@ module.exports = (moduleName, options, benchmark, input) => {
// Change the option of the given module. // Change the option of the given module.
sequencer.steps[1].setOptions(options[1]); sequencer.steps[1].setOptions(options[1]);
// Run the ImageSequencer witch changed option. // Run the ImageSequencer witch changed option.
sequencer.run({ mode: 'test' }, () => { sequencer.run(() => {
let newResult = sequencer.steps[1].output.src; let newResult = sequencer.steps[1].output.src;
base64Img.imgSync(newResult, target, 'newResult'); base64Img.imgSync(newResult, target, 'newResult');