-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkarma.conf.js
More file actions
46 lines (36 loc) · 1 KB
/
karma.conf.js
File metadata and controls
46 lines (36 loc) · 1 KB
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
const path = require('path');
const webpackConfig = require('./webpack.config');
webpackConfig.mode = 'development';
delete webpackConfig.entry;
delete webpackConfig.output;
const jsPrefix = 'src/main/resources/frontend';
const specGlob = 'test/**/*.spec.js';
const specPath = path.join(__dirname, jsPrefix, specGlob);
module.exports = function (config) {
config.set({
frameworks: ['jasmine', 'webpack'],
files: ['node_modules/jquery/dist/jquery.js', specPath],
preprocessors: {
'**/*.spec.js': ['webpack', 'sourcemap']
},
webpack: webpackConfig,
reporters: ['spec'],
browsers: ['ChromeHeadless'],
customLaunchers: {
Chrome_Headless: {
base: 'Chrome',
flags: [
'--headless',
'--disable-gpu',
'--no-sandbox',
'--remote-debugging-port=9222',
'--window-size=1440,900'
]
}
},
// used to produce test output for Jenkins
junitReporter: {
outputDir: 'target/karma'
}
});
};