Skip to content

Instantly share code, notes, and snippets.

@qetr1ck-op
Last active February 9, 2017 21:04
Show Gist options
  • Save qetr1ck-op/0b3aea0027229157e671dad03bf75064 to your computer and use it in GitHub Desktop.
Save qetr1ck-op/0b3aea0027229157e671dad03bf75064 to your computer and use it in GitHub Desktop.
// Karma configuration
// Generated on Wed Nov 02 2016 10:09:14 GMT+0200 (FLE Standard Time)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['browserify', 'jasmine'],
// list of files / patterns to load in the browser
files: [
// external libs
/*
'node_modules/angular/angular.js',
other deps..
'node_modules/angular-mocks/angular-mocks.js',
*/
// project files
/*
'app/common/common.js',
'app/module1/module1.js',
other modules..
*/
'app/**/*.spec.js'
],
// list of files to exclude
exclude: [],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
// 'app/**/*.js': ['browserify'],
'app/**/*.spec.js': ['browserify']
},
// configure jasmine.frameworks
browserify: {
debug: true,
transform: ['babelify']
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['mocha'],
// List of plugins to load.
// A plugin can be a string (in which case it will be required by Karma)
// or an inlined plugin - Object.
// By default, Karma loads all sibling NPM modules which have a name starting
// with karma-*.
// plugins: ['karma-browserify', 'karma-jasmine', 'karma-phantomjs-launcher', 'karma-spec-reporter'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment