Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Commit

Permalink
adding tests for multiple target flow configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanebachelier committed Apr 15, 2015
1 parent 234510d commit 6f65ac5
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions test/test-flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,35 @@ describe('Flow builder from configuration', function () {
assert.deepEqual(flow.steps('css'), []);
});
});

describe('Support multiple targets', function () {
it('should enable clearing all steps for a type', function () {
var config = {
foo: 'foo.html',
bar: 'bar.html',
options: {
flow: {
foo: {
steps: {}
},
bar: {
steps: {
js: ['concat'],
css: ['concat']
}
}
}
}
};

var fooFlow = Flow.getFlowFromConfig(config, 'foo');
var barFlow = Flow.getFlowFromConfig(config, 'bar');

assert.deepEqual(fooFlow.steps('js'), Flow.defaultConfig.steps.js);
assert.deepEqual(fooFlow.steps('css'), Flow.defaultConfig.steps.css);

assert.deepEqual(barFlow.steps('js'), ['concat']);
assert.deepEqual(barFlow.steps('css'), ['concat']);
});
});
});

0 comments on commit 6f65ac5

Please sign in to comment.