-
Notifications
You must be signed in to change notification settings - Fork 24
/
karma.conf.js
31 lines (28 loc) · 700 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
import { argv } from 'yargs'
import _debug from 'debug'
import webpackTestConfig from './webpack/test.config'
const debug = _debug('app:karma')
debug('Create configuration.')
const karmaConfig = {
frameworks: ['mocha'],
reporters: ['spec', 'coverage'],
files: ['__tests__/index.test.js'],
preprocessors: {
'__tests__/index.test.js': ['webpack', 'sourcemap']
},
browsers: [
// 'Chrome',
'PhantomJS'
],
singleRun: !argv.watch,
coverageReporter: {
dir: 'coverage/',
type: 'html'
},
webpack: webpackTestConfig,
webpackMiddleware: {
noInfo: true
}
}
// cannot use `export default` because of Karma.
module.exports = (config) => config.set(karmaConfig)