1
1
// Karma configuration
2
- // Generated on Fri May 30 2014 15:44:45 GMT-0400 (EDT)
3
-
4
2
module . exports = function ( config ) {
5
3
var configuration = {
6
4
@@ -39,37 +37,64 @@ module.exports = function (config) {
39
37
// web server port
40
38
port : 9876 ,
41
39
42
- // enable / disable colors in the output (reporters and logs)
43
- colors : true ,
44
-
45
40
// level of logging
46
41
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
47
42
logLevel : config . LOG_WARN ,
48
43
44
+ // enable / disable colors in the output (reporters and logs)
45
+ colors : true ,
46
+
49
47
// enable / disable watching file and executing tests whenever any file changes
50
- autoWatch : true ,
48
+ autoWatch : false ,
51
49
52
50
// start these browsers
53
51
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
54
- browsers : [
55
- 'Chrome'
56
- // 'ChromeCanary',
57
- // 'Firefox',
58
- // 'Safari',
59
- // 'PhantomJS'
60
- ] ,
52
+ browsers : [ 'Chrome1280x1024' ] ,
61
53
62
54
customLaunchers : {
63
- Chrome_travis_ci : {
55
+ Chrome1280x1024 : {
64
56
base : 'ChromeHeadless' ,
65
- flags : [ '--no-sandbox' ]
57
+ // increased viewport is required for some tests (TODO fix tests)
58
+ // https://github.com/Leaflet/Leaflet/issues/7113#issuecomment-619528577
59
+ flags : [ '--window-size=1280,1024' ]
60
+ } ,
61
+ FirefoxTouch : {
62
+ base : 'FirefoxHeadless' ,
63
+ prefs : {
64
+ 'dom.w3c_touch_events.enabled' : 1
65
+ }
66
+ } ,
67
+ FirefoxNoTouch : {
68
+ base : 'FirefoxHeadless' ,
69
+ prefs : {
70
+ 'dom.w3c_touch_events.enabled' : 0
71
+ }
72
+ } ,
73
+ IE10 : {
74
+ base : 'IE' ,
75
+ 'x-ua-compatible' : 'IE=EmulateIE10'
66
76
}
67
77
} ,
68
78
79
+ concurrency : 1 ,
80
+
81
+ // If browser does not capture in given timeout [ms], kill it
82
+ captureTimeout : 60000 ,
83
+
84
+ // Timeout for the client socket connection [ms].
85
+ browserSocketTimeout : 30000 ,
86
+
69
87
// Continuous Integration mode
70
88
// if true, Karma captures browsers, runs the tests and exits
71
89
singleRun : true ,
72
90
91
+ client : {
92
+ mocha : {
93
+ // eslint-disable-next-line no-undef
94
+ forbidOnly : process . env . CI || false
95
+ }
96
+ } ,
97
+
73
98
// Configure the coverage reporters
74
99
coverageReporter : {
75
100
reporters : [
@@ -83,9 +108,5 @@ module.exports = function (config) {
83
108
}
84
109
} ;
85
110
86
- if ( process . env . TRAVIS ) {
87
- configuration . browsers = [ 'Chrome_travis_ci' ] ;
88
- }
89
-
90
111
config . set ( configuration ) ;
91
112
} ;
0 commit comments