Skip to content

Instantly share code, notes, and snippets.

@iladarsda
Last active August 29, 2015 14:09
Show Gist options
  • Save iladarsda/661c33dbf4e1679e6743 to your computer and use it in GitHub Desktop.
Save iladarsda/661c33dbf4e1679e6743 to your computer and use it in GitHub Desktop.
AngularJS/TDD: Sample Karma config file
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
files: [
// lib
'./app/lib/angular/angular.js',
'./app/lib/**/angular-*.js',
// source
'./app/js/index.js',
'./app/js/**/*.js',
// tests
'./test/unit/**/*.spec.js'
],
//plugins: ['karma-jasmine', 'karma-mocha-reporter', 'karma-coverage', 'karma-chrome-launcher', 'karma-phantomjs-launcher', 'karma-firefox-launcher'],
plugins: ['karma-*'],
customLaunchers: {
Chrome_without_security: {
base: 'Chrome',
flags: ['--disable-web-security']
}
},
// reporters: ['mocha'], dots, progress, growl, junit, teamcity or coverage
reporters: ['mocha'],
port: 9876,
colors: true,
logLevel: config.LOG_ERROR,
autoWatch: true,
// browsers: ['Chrome', 'Firefox', 'PhantomJS'],
browsers: ['PhantomJS'],
singleRun: false
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment