forked from georchestra/mapstore2-georchestra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.single-run.js
28 lines (27 loc) · 1.13 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
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: "pre",
use: [
{
loader: 'babel-istanbul-loader'
}
]
}, ...testConfig.webpack.module.rules];
config.set(testConfig);
};