Skip to content

Commit

Permalink
test(config): add test for config files using only per-capability specs
Browse files Browse the repository at this point in the history
To prevent bugs like #2925 in the future.
  • Loading branch information
juliemr committed Feb 10, 2016
1 parent edfb52f commit 4db52f2
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions spec/unit/taskScheduler_test.js
Expand Up @@ -162,6 +162,27 @@ describe('the task scheduler', function() {
expect(scheduler.numTasksOutstanding()).toEqual(0);
});


it('should work with only capability-specific specs', function() {
var toAdd = {
specs: [
],
multiCapabilities: [{
'browserName': 'chrome',
specs: 'spec/unit/data/fakespecC.js'
}]
};
var config = new ConfigParser().addConfig(toAdd).getConfig();
var scheduler = new TaskScheduler(config);

var task = scheduler.nextTask();
expect(task.capabilities.browserName).toEqual('chrome');
expect(task.specs.length).toEqual(1);

task.done();
expect(scheduler.numTasksOutstanding()).toEqual(0);
});

it('should handle multiCapabilities with mixture of features', function() {
var toAdd = {
specs: [
Expand Down

0 comments on commit 4db52f2

Please sign in to comment.