-
Notifications
You must be signed in to change notification settings - Fork 49
/
.karma.conf.js
56 lines (49 loc) · 2.07 KB
/
.karma.conf.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
// TODO: It doesn't work with node 17.
module.exports = function(config) {
config.set({
basePath: '',
plugins: [
'karma-mocha', 'karma-chai', 'karma-coverage', 'karma-coverage-istanbul-reporter',
'karma-chrome-launcher', 'karma-firefox-launcher', 'karma-phantomjs-launcher',
],
frameworks: ['mocha', 'chai'],
files: [
{pattern: 'build/package/gdal3.coverage.js', included: true, served: true, watched: false, nocache: true},
{pattern: 'build/package/gdal3WebAssembly.js', included: false, served: true, watched: false, nocache: true},
{pattern: 'build/package/gdal3WebAssembly.wasm', included: false, served: true, watched: false, nocache: true},
{pattern: 'build/package/gdal3WebAssembly.data', included: false, served: true, watched: false, nocache: true},
{pattern: 'test/data/*', included: false, served: true, watched: false, nocache: true},
{pattern: 'src/**/*.spec.js', type: 'module', included: true, served: true, watched: false, nocache: true},
{pattern: 'test/*.spec.js', type: 'module', included: true, served: true, watched: false, nocache: true}
],
proxies: {
'/data/': '/base/test/data/',
'/test/data/': '/base/test/data/',
'/package/': '/base/build/package/',
'/build/package/': '/base/build/package/'
},
exclude: [],
preprocessors: {'src/allJsFunctions/**/!(*spec).js': ['coverage']},
reporters: ['progress', 'coverage-istanbul'],
/* coverageReporter: {
type : 'html',
dir : 'build/coverage/',
fixWebpackSourcePaths: true,
combineBrowserReports: true
}, */
coverageIstanbulReporter: {
reports: ['json', 'html'],
dir: 'build/coverage/browser',
combineBrowserReports: true,
fixWebpackSourcePaths: true,
skipFilesWithNoCoverage: true,
verbose: false,
},
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
singleRun: true,
concurrency: Infinity,
browsers: ['ChromeHeadless', 'FirefoxHeadless'/*, 'Firefox', 'FirefoxHeadless', 'Chrome', 'ChromeHeadless' */]
})
}