-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
54 lines (53 loc) · 1.25 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
const webpackConf = require('./webpack.config.js')
delete webpackConf.entry
webpackConf.externals = {
'react/addons': 'react',
'react/lib/ExecutionEnvironment': 'react',
'react/lib/ReactContext': 'react',
}
module.exports = function(config) {
config.set({
basePath: './src/scripts',
frameworks: ['power-assert', 'mocha', 'es6-shim'],
browsers: ['PhantomJS'],
files: [
'test/**/*.test.ts',
'test/**/*.test.tsx',
],
plugins: [
'karma-power-assert',
'karma-mocha',
'karma-mocha-reporter',
'karma-coverage',
'karma-chrome-launcher',
'karma-phantomjs-launcher',
'karma-sourcemap-writer',
'karma-sourcemap-loader',
'karma-webpack',
'karma-es6-shim',
],
preprocessors: {
'test/**/*.test.ts': ['webpack', 'sourcemap'],
'test/**/*.test.tsx': ['webpack', 'sourcemap'],
},
port: 9876,
concurrency: Infinity,
singleRun: false,
reporters: ['mocha'],
mochaReporter: {
colors: true,
},
browserConsoleLogOptions: {
level: '',
terminal: true,
},
loggers: [
{ type: 'console'},
],
logLevel: config.LOG_INFO,
webpack: webpackConf,
webpackMiddleware: {
stats: 'errors-only',
},
})
}