Skip to content

Commit

Permalink
Using webpack for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mzabriskie committed Jun 13, 2015
1 parent a1c1028 commit 12dd89e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 19 deletions.
42 changes: 24 additions & 18 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,13 @@ var test = path.join(process.cwd(), 'specs/main.js');

module.exports = function(config) {
var conf = {

basePath: '',

frameworks: ['mocha', 'browserify'],

files: [
test
],

exclude: [],

preprocessors: {
frameworks: ['mocha'],

},
files: [test],

browserify: {
transform: ['envify', 'reactify'],
watch: true,
debug: true
},
preprocessors: {},

reporters: ['progress'],

Expand All @@ -38,10 +25,29 @@ module.exports = function(config) {

captureTimeout: 60000,

singleRun: false
singleRun: false,

webpack: {
cache: true,
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: path.resolve(process.env.RACKT_PATH, 'node_modules/babel-loader')
}
]
}
},

webpackServer: {
stats: {
colors: true
}
}
};

conf.preprocessors[test] = ['browserify'];
conf.preprocessors[test] = ['webpack'];

config.set(conf);
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"babel-core": "^5.5.6",
"babel-loader": "^5.1.4",
"karma": "^0.12.36",
"karma-browserify": "^4.2.1",
"karma-chrome-launcher": "^0.1.12",
"karma-cli": "0.0.4",
"karma-firefox-launcher": "^0.1.6",
Expand All @@ -32,6 +31,7 @@
"karma-opera-launcher": "^0.1.0",
"karma-phantomjs-launcher": "^0.2.0",
"karma-safari-launcher": "^0.1.1",
"karma-webpack": "^1.5.1",
"minimist": "^1.1.1",
"mocha": "^2.2.5",
"react": "^0.13.3",
Expand Down

0 comments on commit 12dd89e

Please sign in to comment.