-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathkarma.conf.js
More file actions
59 lines (57 loc) · 1.82 KB
/
karma.conf.js
File metadata and controls
59 lines (57 loc) · 1.82 KB
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
59
// From https://github.com/dwmkerr/react-es6-starter
var path = require('path')
module.exports = function (config) {
config.set({
browsers: ['PhantomJS'],
files: [
// We need to polyfill as PhantomJS doesn't support 'bind'.
'./node_modules/phantomjs-polyfill/bind-polyfill.js',
'./node_modules/phantomjs-polyfill-object-assign/object-assign-polyfill.js',
'./src/**/*.spec.js*',
],
frameworks: ['mocha'],
preprocessors: {
'./src/**/*.spec.js*': ['webpack'],
'./src/**/*.js*': ['webpack'],
},
reporters: ['progress', 'coverage', 'coveralls'],
singleRun: true,
webpack: {
entry: {},
module: {
externals: {
'jsdom': 'window',
'cheerio': 'window',
'react/lib/ExecutionEnvironment': true,
},
preLoaders: [
{
test: /\.jsx?$/,
exclude: [
/node_modules/,
/\.spec\.js/,
],
loader: 'isparta-instrumenter-loader',
},
],
loaders: [
{
test: /\.jsx?$/,
loader: 'babel-loader',
include: path.resolve(__dirname, './src'),
},
],
},
},
webpackMiddleware: {
noInfo: true,
},
coverageReporter: {
dir: './build/coverage/',
reporters: [
{ type: 'html', subdir: 'html' },
{ type: 'lcov', subdir: 'lcov' },
],
},
})
}