-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
124 lines (107 loc) · 2.31 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/*eslint no-var: 0*/
var path = require('path');
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
files: [
'tests/helpers/**/*.js',
'tests/main.js'
],
preprocessors: {
'tests/**/*.js': ['webpack', 'sourcemap']
},
exclude: [],
port: 8090,
logLevel: config.LOG_WARN,
colors: true,
autoWatch: false,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: ['PhantomJS'],
coverageReporter: {
dir: 'reports/coverage/',
reporters: [
{ type: 'html', subdir: 'html' },
{ type: 'lcov', subdir: 'lcov' },
{ type: 'cobertura', subdir: '.', file: 'cobertura.xml' },
{ type: 'lcovonly', subdir: '.', file: 'report-lcovonly.txt' },
{ type: 'teamcity', subdir: '.', file: 'teamcity.txt' },
{ type: 'text', subdir: '.', file: 'text.txt' },
{ type: 'text-summary', subdir: '.', file: 'text-summary.txt' }
]
},
htmlReporter: {
outputDir: 'reports',
reportName: 'test-results'
},
junitReporter: {
outputDir: 'reports/test-results/',
outputFile: 'index.xml',
suite: 'react-editor-component',
useBrowserName: false
},
// other possible values: 'dots', 'progress', 'junit', 'html', 'coverage'
reporters: ['mocha'],
captureTimeout: 60000,
singleRun: true,
webpackServer: {
noInfo: true,
stats: {
version: false,
hash: false,
timings: false,
assets: false,
chunks: false,
chunkModules: false,
chunkOrigins: false,
modules: false,
cached: false,
cachedAssets: false,
showChildren: false,
source: false,
colors: true,
reasons: true,
errorDetails: true
}
},
webpack: {
cache: true,
debug: true,
devtool: 'inline-source-map',
resolve: {
root: path.resolve(__dirname, 'src'),
extensions: ['', '.js', '.jsx']
},
module: {
preLoaders: [
{
test: /\.js(x)?$/,
loader: 'isparta-instrumenter',
exclude: [
/node_modules/i,
/__test__/i,
/tests\/.*/i
]
}
],
loaders: [
{ test: /\.json$/, loader: 'json' },
{
test: /\.js(x)?$/,
loader: 'babel',
exclude:[
/node_modules/
]
}
]
}
}
});
};