Tests added (#943)

This commit is contained in:
aashna27
2019-03-27 17:19:42 +05:30
committed by Jeffrey Warren
parent a8757a888a
commit 8ad171ee56
9 changed files with 157 additions and 134 deletions

View File

@@ -13,20 +13,20 @@ var target = 'test_outputs'
var options = {channel: 'red'}
test('Channel module loads correctly', function(t) {
sequencer.loadImages('test', red)
sequencer.loadImages( red)
sequencer.addSteps('channel', options)
t.equal(sequencer.images.test.steps[1].options.name, 'channel', 'Channel module is getting loaded')
t.equal(sequencer.steps[1].options.name, 'channel', 'Channel module is getting loaded')
t.end()
})
test('Channel module loads with correct options', function(t) {
t.equal(sequencer.images.test.steps[1].options.channel, 'red', 'Options are correct');
t.equal(sequencer.steps[1].options.channel, 'red', 'Options are correct');
t.end();
})
test('Channel 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'