-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
59 lines (57 loc) · 1.31 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
57
58
59
const webpackConfig = require('./webpack.config');
// webpackConfig.target = 'node';
module.exports = function _webpackConfig(config) {
config.set({
browserNoActivityTimeout: 60000,
browserDisconnectTolerance: 2,
browsers: ['PhantomJS'],
concurrency: 1,
coverageReporter: {
dir: 'test/results/coverage',
reporters: [{
type: 'html'
}],
includeAllSources: true
},
customLaunchers: {
ChromeIgnoreCertErrors: {
base: 'Chrome',
flags: ['--ignore-certificate-errors']
}
},
files: [
'node_modules/babel-polyfill/dist/polyfill.js',
'test/unit/helpers/karmaInject.js',
'test/unit/testsIndex.js'
],
frameworks: [
'jasmine'
],
htmlReporter: {
outputDir: 'test/results/spec'
},
junitReporter: {
outputDir: 'test/results/junit', // results will be saved as $outputDir/$browserName.xml
outputFile: 'results.xml' // if included, results will be saved as $outputDir/$browserName/$outputFile
},
preprocessors: {
// 'client/**/*.js': ['webpack', 'coverage'],
'test/unit/testsIndex.js': ['webpack', 'sourcemap']
},
reporters: [
'progress',
// 'coverage-allsources',
'coverage',
'html',
'spec'
],
singleRun: true,
webpack: webpackConfig,
webpackMiddleware: {
noInfo: 'errors-only',
stats: {
chunks: false
}
}
});
};