File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ if (process.env.SAUCE_ACCESS_KEY && process.env.SAUCE_USERNAME) {
25
25
job = process . env . TRAVIS_JOB_NUMBER ;
26
26
build = `travis@${ process . env . TRAVIS_JOB_NUMBER } ` ;
27
27
startConnect = true ;
28
- } else {
28
+ } else if ( ! process . env . KARMA_MANUAL ) {
29
29
browsers = [ ] ;
30
30
frameworks . push ( 'detectBrowsers' ) ;
31
31
}
@@ -68,6 +68,20 @@ module.exports = function configureKarma(config) {
68
68
detectBrowsers : {
69
69
enabled : true ,
70
70
usePhantomJS : false ,
71
+ postDetection ( detectedBrowsers ) {
72
+ if ( detectedBrowsers . length === 0 ) {
73
+ /* eslint-disable no-console, no-process-exit */
74
+ console . log ( '**********************************' ) ;
75
+ console . log ( '**************WARNING*************' ) ;
76
+ console . log ( '**********************************' ) ;
77
+ console . log ( 'Karma has been unable to detect a browser on your system' ) ;
78
+ console . log ( 'Karma will now exit(0). If you have a browser you\'d like to test' ) ;
79
+ console . log ( 'please run `env KARMA_MANUAL=1 karma`, and manually load up a browser' ) ;
80
+ process . exit ( 0 ) ;
81
+ /* eslint-enable */
82
+ }
83
+ return detectedBrowsers ;
84
+ } ,
71
85
} ,
72
86
sauceLabs : {
73
87
testName : packageJson . name ,
You can’t perform that action at this time.
0 commit comments