Skip to content

Instantly share code, notes, and snippets.

@iissnan
Created February 13, 2015 08:08
Show Gist options
  • Select an option

  • Save iissnan/a71c6aa618c9af96e0a1 to your computer and use it in GitHub Desktop.

Select an option

Save iissnan/a71c6aa618c9af96e0a1 to your computer and use it in GitHub Desktop.
Karma testing configuration.
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['mocha', 'chai', 'sinon'],
files: [
'../common/assets/vendor/jquery/dist/jquery.min.js',
'../common/assets/vendor/angular/angular.min.js',
'../common/assets/vendor/angular-mocks/angular-mocks.js',
'../common/assets/vendor/lodash/lodash.min.js',
'../common/assets/js/**/*.js',
'unit/**/*.spec.js'
],
port: 9876,
colors: true,
preprocessors: {
'../common/assets/js/**/*.js': ['coverage']
},
reporters: ['mocha', 'coverage'],
mochaReporter: {
output: 'autowatch'
},
coverageReporter: {
type: 'text'
},
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ["PhantomJS"]
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment