forked from namespace-ee/react-calendar-timeline
-
Notifications
You must be signed in to change notification settings - Fork 1
/
karma.conf.js
44 lines (34 loc) · 1008 Bytes
/
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
module.exports = function(config) {
config.set({
basePath: '.',
frameworks: ['jasmine'],
browsers: ['PhantomJS'],
files: [
// shim to workaroud PhantomJS 1.x lack of `bind` support
// see: https://github.com/ariya/phantomjs/issues/10522
'node_modules/es5-shim/es5-shim.js',
// React is an external dependency of the component
'node_modules/react/dist/react-with-addons.js',
'spec/spec-helper.js',
'spec/**/*.spec.*',
{ pattern: 'lib/**/*', watched: true, included: false }
],
preprocessors: {
// add webpack as preprocessor
'spec/**/*.spec.*': ['webpack', 'sourcemap']
},
webpack: loadWebpackConfig(),
webpackServer: {
noInfo: true
},
singleRun: true
});
};
/**
Loads configuration while ensuring sounce-map is enabled
*/
function loadWebpackConfig () {
var webpackConfig = require('./webpack.config.js');
webpackConfig.devtool = 'inline-source-map';
return webpackConfig;
}