-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
37 lines (37 loc) · 1021 Bytes
/
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
module.exports = config => {
config.set({
frameworks: ['jasmine'],
files: [{ pattern: './src/**/*.spec.js' }],
preprocessors: {
'./src/**/*.spec.js': ['webpack', 'sourcemap'],
'src/**/*.js': ['coverage']
},
autoWatch: true,
reporters: ['dots', 'coverage'],
coverageReporter: {
dir: 'coverage',
reporters: [
{ type: 'lcovonly', subdir: '.', file: 'report-lcovonly.txt' }
]
},
logLevel: config.LOG_INFO,
singleRun: false,
browsers: ['PhantomJS'],
customLaunchers: {
// tell TravisCI to use chromium when testing
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
webpack: require('./webpack.config'),
webpackServer: {
noInfo: true
}
});
// In case we do not want to use phantom, but real chrome
// Detect if this is TravisCI running the tests and tell it to use chromium
// if (process.env.TRAVIS) {
// config.browsers = ['Chrome_travis_ci'];
// }
};