Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 4db52f2

Browse files
committed
test(config): add test for config files using only per-capability specs
To prevent bugs like #2925 in the future.
1 parent edfb52f commit 4db52f2

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

spec/unit/taskScheduler_test.js

+21
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,27 @@ describe('the task scheduler', function() {
162162
expect(scheduler.numTasksOutstanding()).toEqual(0);
163163
});
164164

165+
166+
it('should work with only capability-specific specs', function() {
167+
var toAdd = {
168+
specs: [
169+
],
170+
multiCapabilities: [{
171+
'browserName': 'chrome',
172+
specs: 'spec/unit/data/fakespecC.js'
173+
}]
174+
};
175+
var config = new ConfigParser().addConfig(toAdd).getConfig();
176+
var scheduler = new TaskScheduler(config);
177+
178+
var task = scheduler.nextTask();
179+
expect(task.capabilities.browserName).toEqual('chrome');
180+
expect(task.specs.length).toEqual(1);
181+
182+
task.done();
183+
expect(scheduler.numTasksOutstanding()).toEqual(0);
184+
});
185+
165186
it('should handle multiCapabilities with mixture of features', function() {
166187
var toAdd = {
167188
specs: [

0 commit comments

Comments
 (0)