react-toolbox/karma.conf.js

34 lines
1.0 KiB
JavaScript
Raw Normal View History

2015-09-21 11:11:20 +03:00
require('webpack');
var pkg = require('./package.json');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = function (config) {
config.set({
browsers: ['PhantomJS'],
singleRun: true,
frameworks: ['mocha'],
files: [
'./node_modules/phantomjs-polyfill/bind-polyfill.js',
'./node_modules/babel-core/browser-polyfill.js',
'tests.webpack.js'
],
reporters: ['dots'],
preprocessors: {'tests.webpack.js': ['webpack']},
webpack: {
2015-10-12 04:12:34 +03:00
resolve: { extensions: ['', '.jsx', '.scss', '.js', '.json'] },
2015-09-21 11:11:20 +03:00
module: {
loaders: [
2015-09-21 21:32:19 +03:00
{ test: /(\.js|\.jsx)$/, exclude: /(node_modules)/, loader: 'babel' },
2015-10-10 12:25:47 +03:00
{ test: /(\.scss|\.css)$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss-loader!sass') },
2015-09-21 11:11:20 +03:00
]
},
watch: true,
plugins: [new ExtractTextPlugin(pkg.name + '.[name].css', {allChunks: false})]
},
webpackServer: {
noInfo: true
}
});
};