-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathkarma-conf.common.js
158 lines (140 loc) · 5.71 KB
/
karma-conf.common.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/* eslint-env node */
/* eslint max-len: 0 */
module.exports = function (config) {
var files = [
'https://geoext.github.io/extjs-gpl/build/classic/theme-neptune/resources/theme-neptune-all_1.css',
'https://geoext.github.io/extjs-gpl/build/classic/theme-neptune/resources/theme-neptune-all_2.css',
'https://geoext.github.io/extjs-gpl/build/classic/theme-neptune/resources/theme-neptune-all.css',
'./node_modules/ol/ol.css',
'./node_modules/ol/dist/ol.js',
'https://geoext.github.io/extjs-gpl/build/ext-all-debug.js',
'https://geoext.github.io/extjs-gpl/build/packages/ux/classic/ux.js',
//'https://geoext.github.io/geoext/master/GeoExt.js',
'https://cdnjs.cloudflare.com/ajax/libs/opentype.js/0.6.9/opentype.min.js',
'./node_modules/jsonix/jsonix.js',
'https://cdn.jsdelivr.net/gh/bjornharrtell/jsts@gh-pages/1.4.0/jsts.min.js',
'./node_modules/@ogc-schemas/ogc-schemas/lib/SLD_1_0_0_GeoServer.js',
'./node_modules/@ogc-schemas/ogc-schemas/lib/Filter_1_0_0.js',
'./node_modules/@ogc-schemas/ogc-schemas/lib/GML_2_1_2.js',
'./node_modules/@ogc-schemas/ogc-schemas/lib/GML_3_1_1.js',
'./node_modules/@ogc-schemas/ogc-schemas/lib/OWS_1_1_0.js',
'./node_modules/@ogc-schemas/ogc-schemas/lib/SMIL_2_0.js',
'./node_modules/@ogc-schemas/ogc-schemas/lib/SMIL_2_0_Language.js',
'./node_modules/@ogc-schemas/ogc-schemas/lib/WCS_1_1.js',
'./node_modules/@ogc-schemas/ogc-schemas/lib/WPS_1_0_0.js',
'./node_modules/w3c-schemas/lib/XLink_1_0.js',
'./node_modules/proj4/dist/proj4.js',
'https://maps.googleapis.com/maps/api/js?v=3.42&key=AIzaSyAj6xrC0L3G0YquO1q6Qsma1ZEfYgGQotU&callback=Function.prototype',
'./node_modules/geostyler-sld-parser/dist/sldStyleParser.iife.js',
'./node_modules/geostyler-openlayers-parser/dist/olStyleParser.iife.js',
'lib/turf.js',
{
pattern: 'node_modules/@geoext/geoext/src/**/*.js',
included: true
},
{
pattern: 'node_modules/@geoext/geoext/classic/**/*.js',
included: true
},
{
pattern: 'node_modules/@terrestris/basigx/src/**/*.js',
served: true,
included: false // or get Duplicate entity name errors
},
'app/util/Style.js', // ensure this is included first as it is used when defining CpsiMapview.view.toolbar.MapFooter
{
pattern: 'app/**/*.js',
watched: true,
served: true,
included: false
},
{
pattern: 'test/**/*.js',
watched: true,
served: true,
included: true
},
{
pattern: 'test/resources/**/*',
included: false,
served: true
}
];
config.set({
basePath: '.',
proxies: {
'/resources': '/base/test/resources',
'/spec': '/base/test/spec',
'/BasiGX': '/base/node_modules/@terrestris/basigx/src',
'/CpsiMapview': '/base/app',
'/GeoExt': '/base/src',
},
// the following works to limit the tests run
// see https://github.com/karma-runner/karma-mocha/issues/192
// also https://stackoverflow.com/questions/38876237/karma-start-passing-parameters
client: {
mocha: {
grep: config.grep
}
},
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'expect', 'sinon'],
plugins: [
require("karma-mocha"),
require("karma-mocha-reporter"),
require("karma-coverage"),
require("karma-expect"),
require("karma-sinon"),
require("karma-chrome-launcher"),
],
// list of files / patterns to load in the browser
files: files,
// list of files to exclude
exclude: [
],
preprocessors: {
'app/**/*.js': ['coverage']
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['mocha', 'coverage'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: [
'ChromeNoSandbox'
// 'Firefox',
// 'Chromium_no_sandbox'
],
customLaunchers: {
ChromeNoSandbox: {
base: 'Chrome',
flags: [
'--no-sandbox',
'--headless',
'--disable-web-security',
'--disable-gpu',
// Without a remote debugging port, Google Chrome exits immediately.
'--remote-debugging-port=9999',
'--remote-debugging-address=1.1.1.1'
]
}
},
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
});
};