-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathkarma.conf.js
More file actions
33 lines (31 loc) · 1023 Bytes
/
Copy pathkarma.conf.js
File metadata and controls
33 lines (31 loc) · 1023 Bytes
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
var webpackConfig = require('./webpack.config.js');
module.exports = function (config){
config.set({
// Which browsers we want to run on
browsers: ['Chrome'],
singleRun: true,
// Karma test runner will use mocha to run tests
frameworks: ['mocha'],
// Need to load common bundle files before the tests
// Run all files that end in .test.jsx in folders under app/tests
// files: ['dist/vendor.bundle.js','dist/index.bundle.js','src/tests/**/*.test.jsx'],
files: ['src/client/tests/**/*.test.jsx'],
// Here "webpack" enables to use webpack modules on the tests
// "sourcemap" enables to use the .jsx files and not the bundles
preprocessors: {
'src/client/tests/**/*.test.jsx': ['webpack', 'sourcemap']
},
// How to format the result of the tests
reporters: ['mocha'],
// Timeout condition for failure
client: {
mocha: {
timeout: '5000'
}
},
webpack: webpackConfig,
webpackServer: {
noInfo: true
}
});
};