-
Notifications
You must be signed in to change notification settings - Fork 23
/
karma.conf.single-run.js
29 lines (28 loc) · 1.08 KB
/
karma.conf.single-run.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
const path = require("path");
module.exports = function karmaConfig(config) {
const testConfig = require('./MapStore2/build/testConfig')({
files: [
'tests.webpack.js',
{ pattern: './js/test-resources/**/*', included: false }
],
path: [path.join(__dirname, "js"), path.join(__dirname, "MapStore2", "web", "client")],
testFile: 'tests.webpack.js',
singleRun: true,
alias: {
"@mapstore": path.resolve(__dirname, "MapStore2", "web", "client"),
"@js": path.resolve(__dirname, "js")
}
});
testConfig.webpack.module.rules = [{
test: /\.jsx?$/,
exclude: /(__tests__|node_modules|legacy|libs\\Cesium|libs\\html2canvas)\\|(__tests__|node_modules|legacy|libs\/Cesium|libs\/html2canvas)\/|webpack\.js|utils\/(openlayers|leaflet)/,
enforce: "post",
use: [
{
loader: 'istanbul-instrumenter-loader',
options: { esModules: true }
}
]
}, ...testConfig.webpack.module.rules];
config.set(testConfig);
};