-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathkarma.conf.js
58 lines (52 loc) · 1.59 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
// karma.conf.js
module.exports = function(config) {
config.set({
frameworks: ['mocha', 'chai'],
browsers: [
'ChromeHeadless', // Use this for CI and regular testing
//'Chrome', // Use this for viewing chrome.runtime errors
//'Firefox', // Maybe in the future?
],
//singleRun: true,
/**
* Level of logging
* possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
*/
logLevel: config.LOG_WARN,
/**
* Test results reporter to use
* possible values: 'dots', 'progress'
* available reporters: https://npmjs.org/browse/keyword/karma-reporter
*/
reporters: ['spec'],
/**
* For slower machines you may need to have a longer browser
* wait time . Uncomment the line below if required.
*/
browserNoActivityTimeout: 300000,
// 'karma-*' is default and loads all available plugins. Kept here
// for visibility and to prevent accidental override.
plugins: ['karma-*'],
colors: true,
files: [
// each file acts as entry point for the webpack configuration
{ pattern: 'test/**/*.js', watched: true },
],
preprocessors: {
// add webpack as preprocessor
'./test/**/*.js': ['webpack'],
},
webpack: require('./webpack.test.config.js'),
webpackMiddleware: {
// webpack-dev-middleware configuration
stats: 'errors-only',
noInfo: true
},
client: {
mocha: {
// change Karma's debug.html to the mocha web reporter
reporter: 'html'
}
}
});
};