forked from frontend-collective/react-sortable-tree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.babel.js
65 lines (64 loc) · 2.05 KB
/
karma.conf.babel.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
55
56
57
58
59
60
61
62
63
64
65
import KarmaJasmine from 'karma-jasmine';
import KarmaWebpack from 'karma-webpack';
import KarmaJasmineDiffReporter from 'karma-jasmine-diff-reporter';
import KarmaJasmineHtmlReporter from 'karma-jasmine-html-reporter';
import KarmaNotifyReporter from 'karma-notify-reporter';
import KarmaSourcemapLoader from 'karma-sourcemap-loader';
import KarmaPhantomjsLauncher from 'karma-phantomjs-launcher';
import webpackConfig from './webpack.config.test.babel';
export default function setConfig(config) {
config.set({
browsers: ['PhantomJS'],
frameworks: ['jasmine'],
files: ['src/tests.js'],
preprocessors: {
'src/tests.js': ['webpack', 'sourcemap']
},
plugins: [
KarmaJasmine,
KarmaWebpack,
KarmaJasmineDiffReporter,
KarmaJasmineHtmlReporter,
KarmaNotifyReporter,
KarmaSourcemapLoader,
KarmaPhantomjsLauncher,
],
reporters: [
'jasmine-diff',
'progress',
'kjhtml',
'notify',
],
jasmineDiffReporter: {
pretty: 4,
json: true,
multiline: {
before: 2, // 2 newlines
after: 2, // 2 newlines
indent: 4, // 4 spaces
},
color: {
actualFg: 'red',
expectedFg: 'green',
actualBg: 'inverse',
expectedBg: 'inverse',
actualWhitespaceBg: '',
expectedWhitespaceBg: '',
},
},
webpack: webpackConfig,
webpackMiddleware: {
stats: {
chunks: false,
hash: false,
version: false,
assets: false,
children: false,
},
},
notifyReporter: {
reportEachFailure: false, // Default: false, Will notify on every failed spec
reportSuccess: false, // Default: true, Will notify when a suite was successful
},
});
}