microtask
Version:
83 lines (59 loc) • 1.6 kB
Plain Text
/*global module, process */
module.exports = function (karma) {
var config = {
// base path, that will be used to resolve files and exclude
basePath: '../../',
// frameworks to use
frameworks: ['mocha','chai'],
// list of files / patterns to load in the browser
files: [
'build/build.js',
'test/task.js'
],
// list of files to exclude
exclude: [
],
// test results reporter to use
reporters: ['spec'],
// web server port
port: 9876,
// cli runner port
runnerPort: 9100,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: karma.LOG_DISABLE || karma.LOG_ERROR || karma.LOG_WARN || karma.LOG_INFO || karma.LOG_DEBUG
logLevel: karma.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
client: {
mocha: { timeout: 5000 },
captureConsole: true
},
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: [ "Firefox", "Chrome", "Safari"],
customLaunchers: {
Chrome_travis: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
// If browser does not capture in given timeout [ms], kill it
captureTimeout: 10000,
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: true
};
// set travis specific browser configuration
if(process.env.TRAVIS){
config.browsers = ["Firefox", "Chrome_travis"];
}
karma.set(config);
};