Skip to content

Instantly share code, notes, and snippets.

@jackmahoney
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jackmahoney/feb9a8b68840a3b69c52 to your computer and use it in GitHub Desktop.
Save jackmahoney/feb9a8b68840a3b69c52 to your computer and use it in GitHub Desktop.
Karma conf for react testing
module.exports = function(config) {
config.set({
frameworks: ['browserify', 'mocha', 'chai'],
//specify browserify preproccesor so we can use server-side components
preprocessors: {
'test/*' : ['browserify']
},
//configure browserify preprocessor to use reactify to parse JSX
browserify: {
debug: true,
transform: ['reactify']
},
// list of files / patterns to load in the browser
files: [
'test/*.shim.js',
'test/*.jsx'
],
browsers: ['PhantomJS'],
singleRun: false,
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment