mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-13 03:40:03 +01:00
Updated Readme and Code Comments
This commit is contained in:
@@ -29,30 +29,52 @@ test('loadImages loads a step', function (t){
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('addStep adds a step', function (t) {
|
||||
test('addSteps("image","name") adds a step', function (t) {
|
||||
sequencer.addSteps('test','do-nothing');
|
||||
t.equal(sequencer.images.test.steps[1].options.name, "do-nothing");
|
||||
t.equal(sequencer.images.test.steps.length, 2, "It Does!")
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('addSteps("name") adds a step', function (t) {
|
||||
sequencer.addSteps('do-nothing');
|
||||
t.equal(sequencer.images.test.steps[2].options.name, "do-nothing");
|
||||
t.equal(sequencer.images.test.steps.length, 3, "It Does!")
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('addSteps(["name"]) adds a step', function (t) {
|
||||
sequencer.addSteps(['do-nothing','do-nothing-pix']);
|
||||
t.equal(sequencer.images.test.steps[3].options.name, "do-nothing");
|
||||
t.equal(sequencer.images.test.steps[4].options.name, "do-nothing-pix");
|
||||
t.equal(sequencer.images.test.steps.length, 5, "It Does!")
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('addSteps("name",o) adds a step', function (t) {
|
||||
sequencer.addSteps('do-nothing',{});
|
||||
t.equal(sequencer.images.test.steps[5].options.name, "do-nothing");
|
||||
t.equal(sequencer.images.test.steps.length, 6, "It Does!")
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('addSteps("image","name",o) adds a step', function (t) {
|
||||
sequencer.addSteps('test','do-nothing',{});
|
||||
t.equal(sequencer.images.test.steps[6].options.name, "do-nothing");
|
||||
t.equal(sequencer.images.test.steps.length, 7, "It Does!")
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
||||
test('removeSteps removes a step', function (t) {
|
||||
sequencer.removeSteps('test',1);
|
||||
t.equal(sequencer.images.test.steps.length, 1, "It Does!");
|
||||
t.equal(sequencer.images.test.steps.length, 6, "It Does!");
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('insertStep inserts a step', function (t) {
|
||||
sequencer.insertSteps('test',1,'do-nothing');
|
||||
t.equal(sequencer.images.test.steps[1].options.name, "do-nothing");
|
||||
t.equal(sequencer.images.test.steps.length, 2, "It Does!");
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('run creates output of steps', function (t) {
|
||||
sequencer.run();
|
||||
var steps = sequencer.images.test.steps
|
||||
var type = typeof(steps[steps.length-1].output)
|
||||
t.equal(type,"object");
|
||||
t.equal(sequencer.images.test.steps.length, 7, "It Does!");
|
||||
t.end();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user