tellform/karma.conf.js

75 lines
1.8 KiB
JavaScript
Raw Normal View History

2015-06-29 22:51:29 +00:00
'use strict';
/**
* Module dependencies.
*/
2015-08-19 22:29:01 +00:00
var applicationConfiguration = require('./config/config'),
bowerFiles = require('main-bower-files');
var bowerDep = bowerFiles('**/**.js');
2015-07-27 18:11:43 +00:00
2015-06-29 22:51:29 +00:00
// Karma configuration
module.exports = function(config) {
config.set({
// Frameworks to use
frameworks: ['jasmine'],
// List of files / patterns to load in the browser
2015-08-21 00:17:14 +00:00
files: bowerDep.concat(applicationConfiguration.assets.js, applicationConfiguration.assets.tests, applicationConfiguration.assets.views),
2015-06-29 22:51:29 +00:00
// Test results reporter to use
// Possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
2015-08-18 21:44:36 +00:00
reporters: ['mocha', 'html', 'progress'],
2015-06-29 22:51:29 +00:00
2015-08-21 00:17:14 +00:00
preprocessors: {
2015-08-21 00:56:21 +00:00
'public/modules/**/*.html': ['ng-html2js'],
'public/modules/**/*.js': ['coverage'],
2015-08-21 00:17:14 +00:00
},
ngHtml2JsPreprocessor: {
stripPrefix: 'public/',
// the name of the Angular module to create
moduleName: 'module-templates'
},
2015-06-29 22:51:29 +00:00
// Web server port
port: 9876,
// Enable / disable colors in the output (reporters and logs)
colors: true,
2015-08-19 22:29:01 +00:00
//Make sure we capture console.log output
client: {
captureConsole: true,
mocha: {
bail: true
}
},
2015-06-29 22:51:29 +00:00
// 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, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
2015-07-27 18:11:43 +00:00
browsers: ['PhantomJS'],
2015-06-29 22:51:29 +00:00
// If browser does not capture in given timeout [ms], kill it
captureTimeout: 60000,
// Continuous Integration mode
// If true, it capture browsers, run tests and exit
2015-08-18 21:44:36 +00:00
singleRun: false
2015-06-29 22:51:29 +00:00
});
};