22
33const path = require ( 'path' )
44
5+ const customLaunchers = {
6+ sl_chrome : {
7+ base : 'SauceLabs' ,
8+ browserName : 'chrome' ,
9+ platform : 'Windows 10' ,
10+ version : '51.0'
11+ } ,
12+ sl_firefox : {
13+ base : 'SauceLabs' ,
14+ browserName : 'firefox' ,
15+ platform : 'Windows 10' ,
16+ version : '47.0'
17+ } ,
18+ sl_ie : {
19+ base : 'SauceLabs' ,
20+ browserName : 'internet explorer' ,
21+ platform : 'Windows 7' ,
22+ version : '11.0' ,
23+ } ,
24+ sl_edge : {
25+ base : 'SauceLabs' ,
26+ browserName : 'MicrosoftEdge' ,
27+ platform : 'Windows 10' ,
28+ version : '13.10586'
29+ } ,
30+ sl_safari : {
31+ base : 'SauceLabs' ,
32+ browserName : 'safari' ,
33+ platform : 'OS X 10.11' ,
34+ version : '9.0' ,
35+ } ,
36+ }
37+
38+ const isTravis = process . env . TRAVIS === 'true'
39+ const isFirstJob = / \. 1 $ / . test ( process . env . TRAVIS_JOB_NUMBER )
40+
41+ const browsers = [ 'PhantomJS2' ]
42+ if ( isTravis && isFirstJob ) {
43+ Array . prototype . push . apply ( browsers , Object . keys ( customLaunchers ) )
44+ }
45+
546module . exports = function ( config ) {
47+
648 config . set ( {
749 basePath : '' ,
850 files : [
@@ -14,14 +56,16 @@ module.exports = function(config) {
1456 } ,
1557
1658 frameworks : [ 'mocha' , 'chai' ] ,
17- reporters : [ 'mocha' ] ,
59+ reporters : [ 'mocha' , 'saucelabs' ] ,
1860
1961 port : 9876 ,
2062 colors : true ,
2163 logLevel : config . LOG_INFO ,
2264 autoWatch : true ,
23- browsers : [ 'PhantomJS2' ] ,
65+ browsers : browsers ,
66+ customLaunchers : customLaunchers ,
2467 singleRun : true ,
68+ concurrency : 3 ,
2569
2670 webpack : {
2771 devtool : 'inline-source-map' ,
0 commit comments