-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathkarma.conf.default.js
44 lines (41 loc) · 1.03 KB
/
karma.conf.default.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
var WebpackTestConfig = require('../webpack-config/webpack.config.test.js');
process.env.NODE_ENV = 'test';
module.exports = function (config) {
config.set({
browsers: ['Chrome', 'IE'],
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
// karma only needs to know about the test bundle
files: [
'src/**/*.spec.js'
],
frameworks: ['chai', 'mocha'],
plugins: [
'karma-chrome-launcher',
'karma-ie-launcher',
'karma-chai-plugins',
'karma-mocha',
'karma-sourcemap-loader',
'karma-webpack',
'karma-mocha-reporter'
],
// run the bundle through the webpack and sourcemap plugins
preprocessors: {
'**/src/**/*.spec.js': ['webpack', 'sourcemap']
},
reporters: ['mocha'],
singleRun: true,
// webpack config object
webpack: WebpackTestConfig,
webpackMiddleware: {
noInfo: true,
}
});
if (process.env.TRAVIS) {
config.browsers = ['Chrome_travis_ci'];
}
};