-
-
Save leobalter/7ddcb14804c1787f7dc8 to your computer and use it in GitHub Desktop.
Revisions
-
frederickfogerty created this gist
Jun 4, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,44 @@ var webpack = require('webpack') module.exports = function (config) { config.set({ browsers: [ 'Chrome' ], //run in Chrome browserNoActivityTimeout: 60000, singleRun: true, //just run once by default frameworks: [ 'mocha' ], //use the mocha test framework files: [ //'src/**/*.{jsx,js}', 'tests.webpack.js' //just load this file ], preprocessors: { 'tests.webpack.js': ['webpack', 'sourcemap' ], //preprocess with webpack and our sourcemap loader //'src/**/*.jsx?': ['coverage'] }, reporters: [ 'mocha', 'coverage' ], //report results in this format mochaReporter: { output: 'autowatch' }, coverageReporter: { reporters: [ {type: 'text'}, {type: 'html'} ] }, webpack: { devtool: 'inline-source-map', module: { loaders: [ { test: /\.jsx?$/, loader: 'babel-loader' } ], postLoaders: [ { test: /\.js$/, exclude: /(test|node_modules|bower_components)\//, loader: 'istanbul-instrumenter' } ] } }, webpackServer: { noInfo: true //please don't spam the console when running in karma! } }); }; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ var context = require.context('./src', true, /\.test\.jsx?$/) // make sure you have your directory and regex test set correctly! context.keys().forEach(context)