Files
react-webpack-template/karma.conf.js
T
2015-08-31 11:21:01 +02:00

57 lines
1.2 KiB
JavaScript

var path = require('path');
var srcPath = __dirname + '/src/';
module.exports = function(config) {
config.set({
basePath: '',
browsers: ['PhantomJS'],
files: [
'test/loadtests.js'
],
port: 8080,
captureTimeout: 60000,
frameworks: ['phantomjs-shim', 'mocha', 'chai'],
client: {
mocha: {
}
},
singleRun: true,
reporters: ['mocha'],
preprocessors: {
'test/loadtests.js': ['webpack', 'sourcemap']
},
webpack: {
cache: true,
devtool: 'inline-source-map',
module: {
loaders: [
{
test: /\.(css|png|jpg|gif|woff|woff2)$/,
loader: 'null-loader'
},
{
test: /\.(js|jsx)$/,
loader: 'babel-loader',
exclude: /node_modules/
}
]
},
resolve: {
extensions: ['', '.js', '.jsx'],
alias: {
actions: srcPath + '/actions/',
helpers: path.join(__dirname, 'test', 'helpers'),
components: srcPath + '/components/',
sources: srcPath + '/sources/',
stores: srcPath + '/stores/',
styles: srcPath + '/styles/'
}
}
},
webpackServer: {
noInfo: true
}
});
};