forked from Brainfock/Brainfock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
48 lines (44 loc) · 1.33 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
/* eslint-env node */
import makeConfig from './webpack/makeConfig';
export default function karmaConf(config) {
config.set({
// autoWatch, it works enabled or not. Probably defined by singleRun.
basePath: '',
browsers: ['ChromeSmall'],
customLaunchers: {
ChromeSmall: {
base: 'Chrome',
// Unfortunately it's not possible to hide browser via negative position,
// and minimized browser is not detected by Karma.
flags: ['--window-size=200,200']
}
},
exclude: ['./node_modules'],
files: [
'src/test/index.js'
],
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'chai'],
logLevel: process.env.CONTINUOUS_INTEGRATION
? config.LOG_WARN
: config.LOG_INFO,
notifyReporter: {
reportSuccess: false
},
port: 9876,
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
// preprocess with webpack and our sourcemap loader
'src/test/index.js': ['webpack', 'sourcemap']
},
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: process.env.CONTINUOUS_INTEGRATION ? [
] : [
'progress', 'notify'
],
webpack: makeConfig(true),
webpackServer: {
noInfo: true
}
});
};