-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
53 lines (52 loc) · 1.73 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
var webpack = require('webpack');
var webpackConfig = require('./webpack.config')("development", {mode: "development"});
module.exports = function (config) {
config.set({
browsers: [ 'PhantomJS' ],
singleRun: true,
colors: true,
frameworks: [ 'jasmine' ],
files: [
'./node_modules/babel-polyfill/dist/polyfill.js',
'test/**/*Test.js'
],
preprocessors: {
'test/**/*Test.js': [ 'webpack', 'sourcemap' ]
},
reporters: [ 'junit' ],
webpack: {
mode: 'development',
devtool: 'inline-source-map', //just do inline source maps instead of the default
module: webpackConfig.module,
externals: {
'cheerio': 'window',
'react/addons': true,
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': true
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('test')
})
]
},
webpackServer: {
noInfo: true //please don't spam the console when running in karma!
},
plugins: [
'karma-jasmine',
'karma-webpack',
'karma-sourcemap-loader',
'karma-junit-reporter',
'karma-phantomjs-launcher',
'karma-babel-preprocessor',
'babel-polyfill',
],
junitReporter: {
outputDir: './target/surefire-reports',
outputFile: 'TEST-net.courtanet.statics.js.KarmaRunnerTest.xml',
suite: 'net.courtanet.statics.js',
useBrowserName: false,
},
});
};