@@ -5,6 +5,7 @@ module.exports = function (config) {
5
5
// 设置测试的超时时间
6
6
7
7
config . set ( {
8
+
8
9
// base path that will be used to resolve all patterns (eg. files, exclude)
9
10
basePath : '' ,
10
11
@@ -21,23 +22,12 @@ module.exports = function (config) {
21
22
browserify : {
22
23
debug : true ,
23
24
transform : [
24
- [
25
- require ( 'babelify' ) ,
26
- {
27
- global : true ,
28
- presets : [ '@babel/preset-env' ] ,
29
- ignore : [
30
- '../src/classic/libs/**' ,
31
- '../test/libs/**' ,
32
- '../node_modules/mapbox-gl/**' ,
33
- '../node_modules/three/**' ,
34
- '../node_modules/xlsx/**' ,
35
- '../node_modules/@turf/**' ,
36
- '../node_modules/lodash/**'
37
- ] ,
38
- plugins : [ 'istanbul' ]
39
- }
40
- ] ,
25
+ [ require ( 'babelify' ) , {
26
+ global : true ,
27
+ presets : [ "@babel/preset-env" ] ,
28
+ ignore : [ "../src/classic/libs/**" , "../test/libs/**" , "../node_modules/mapbox-gl/**" , "../node_modules/three/**" , "../node_modules/xlsx/**" , "../node_modules/@turf/**" , "../node_modules/lodash/**" ] ,
29
+ plugins : [ 'istanbul' ]
30
+ } ] ,
41
31
[ require ( 'browserify-css' ) , { global : true } ] ,
42
32
require ( 'browserify-imgify' )
43
33
]
@@ -51,9 +41,9 @@ module.exports = function (config) {
51
41
'./resources/img/**.png' ,
52
42
/***classic的源码***/
53
43
/*由于除了classic其他都不依赖于8c,所以classic 的引入放在最后,以免被common覆盖*/
54
- { pattern : '../src/classic/libs/SuperMap_Basic-8.1.1-17729.js' , include : false } ,
55
- { pattern : '../src/classic/libs/Lang/*.js' , include : false } ,
56
- { pattern : '../src/classic/theme/default/*.css' , include : false } ,
44
+ { pattern : '../src/classic/libs/SuperMap_Basic-8.1.1-17729.js' , include : false } ,
45
+ { pattern : '../src/classic/libs/Lang/*.js' , include : false } ,
46
+ { pattern : '../src/classic/theme/default/*.css' , include : false } ,
57
47
/**测试文件**/
58
48
'./test-main-classic.js' ,
59
49
@@ -63,22 +53,22 @@ module.exports = function (config) {
63
53
'./test-main-common.js' ,
64
54
65
55
/***leaflet的源码***/
66
- { pattern : './libs/workers/TurfWorkerForTest.js' , include : false } ,
67
- { pattern : '../node_modules/leaflet/dist/leaflet.css' , include : false } ,
68
- { pattern : '../src/leaflet/**/**/*.css' , include : false } ,
56
+ { pattern : './libs/workers/TurfWorkerForTest.js' , include : false } ,
57
+ { pattern : '../node_modules/leaflet/dist/leaflet.css' , include : false } ,
58
+ { pattern : '../src/leaflet/**/**/*.css' , include : false } ,
69
59
'../src/leaflet/**/!(index).js' ,
70
60
/**测试文件**/
71
61
'./test-main-leaflet.js' ,
72
62
73
63
/***openlayers的源码***/
74
- { pattern : '../node_modules/ol/ol.css' , include : false } ,
75
- { pattern : '../src/openlayers/**/**/*.css' , include : false } ,
64
+ { pattern : '../node_modules/ol/ol.css' , include : false } ,
65
+ { pattern : '../src/openlayers/**/**/*.css' , include : false } ,
76
66
'../src/openlayers/**/!(index).js' ,
77
67
/**测试文件**/
78
68
'./test-main-openlayers.js' ,
79
69
80
70
/***mapboxgl***/
81
- { pattern : '../node_modules/mapbox-gl/dist/mapbox-gl.css' , include : false } ,
71
+ { pattern : '../node_modules/mapbox-gl/dist/mapbox-gl.css' , include : false } ,
82
72
'../src/mapboxgl/**/!(index).js' ,
83
73
/**测试文件**/
84
74
'./test-main-mapboxgl.js'
@@ -131,37 +121,41 @@ module.exports = function (config) {
131
121
132
122
coverageReporter : {
133
123
dir : 'testcoverage/' ,
134
- reporters : [ { type : 'lcov' , subdir : '.' } ]
135
- } ,
136
- // sonarQubeUnitReporter: {
137
- // sonarQubeVersion: 'LATEST',
138
- // outputFile: 'testcoverage/ut_report.xml',
139
- // useBrowserName: false
140
- // },
124
+ reporters : [
125
+ { type : 'lcov' , subdir : '.' }
126
+ ]
127
+ }
128
+ ,
141
129
142
130
// web server port
143
131
port : 9876 ,
144
132
133
+
145
134
// enable / disable colors in the output (reporters and logs)
146
135
colors : true ,
147
136
137
+
148
138
// level of logging
149
139
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
150
140
logLevel : config . LOG_INFO ,
151
141
142
+
152
143
// enable / disable watching file and executing tests whenever any file changes
153
144
autoWatch : true ,
154
145
146
+
155
147
// start these browsers
156
148
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
157
149
browsers : [ 'Chrome' ] ,
158
150
151
+
159
152
// Continuous Integration mode
160
153
// if true, Karma captures browsers, runs the tests and exits
161
154
singleRun : false ,
162
155
163
156
// Concurrency level
164
157
// how many browser should be started simultaneous
165
158
concurrency : Infinity
166
- } ) ;
159
+
160
+ } )
167
161
} ;
0 commit comments