2013-10-20 07:13:24 +00:00
|
|
|
// Karma configuration
|
|
|
|
|
|
2013-12-10 17:54:59 +00:00
|
|
|
module.exports = function (config) {
|
|
|
|
|
config.set({
|
|
|
|
|
basePath : '',
|
|
|
|
|
|
2013-12-11 17:03:20 +00:00
|
|
|
frameworks : ["jasmine"],
|
2013-12-10 17:54:59 +00:00
|
|
|
|
|
|
|
|
files : [
|
2013-12-11 21:32:20 +00:00
|
|
|
'./app/bower_components/angular/angular.js',
|
2013-12-11 22:09:25 +00:00
|
|
|
'./app/bower_components/angular-mocks/angular-mocks.js',
|
|
|
|
|
'./app/bower_components/underscore/underscore-min.js',
|
|
|
|
|
'./app/bower_components/requirejs/require.js',
|
|
|
|
|
'./app/scripts/mifosX.js',
|
|
|
|
|
'./app/scripts/models/*.js',
|
|
|
|
|
'./app/scripts/services/*.js',
|
|
|
|
|
'./app/scripts/directives/*.js',
|
|
|
|
|
'./app/scripts/controllers/**/*.js',
|
|
|
|
|
'./test/spec/**/*.js'
|
2013-12-10 17:54:59 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
|
|
// list of files to exclude
|
|
|
|
|
exclude : [],
|
|
|
|
|
|
|
|
|
|
// test results reporter to use
|
|
|
|
|
// possible values: dots || progress || growl
|
2014-03-27 05:46:07 +00:00
|
|
|
reporters : ['progress', 'coverage'],
|
|
|
|
|
|
|
|
|
|
preprocessors: {
|
|
|
|
|
'./app/scripts/**/*.js' : ['coverage']
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
junitReporter : {
|
|
|
|
|
outputFile: 'karma-reports/test-unit.xml',
|
|
|
|
|
suite: 'unit'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
coverageReporter: {
|
|
|
|
|
reporters:[
|
|
|
|
|
{type : 'cobertura', dir : 'karma-reports/'},
|
|
|
|
|
{type : 'text', dir : 'karma-reports/', file : 'coverage.txt'},
|
|
|
|
|
{type : 'html', dir : 'karma-reports/' }
|
|
|
|
|
]
|
|
|
|
|
},
|
2013-12-10 17:54:59 +00:00
|
|
|
|
|
|
|
|
// web server port
|
|
|
|
|
port : 8080,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// cli runner port
|
|
|
|
|
runnerPort : 9100,
|
|
|
|
|
|
|
|
|
|
// enable / disable colors in the output (reporters and logs)
|
|
|
|
|
colors : true,
|
|
|
|
|
|
|
|
|
|
// level of logging
|
|
|
|
|
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
|
|
|
|
|
logLevel : LOG_INFO,
|
|
|
|
|
|
|
|
|
|
autoWatch : false,
|
|
|
|
|
|
2013-12-11 17:03:20 +00:00
|
|
|
browsers : ['PhantomJS'],
|
2013-12-10 17:54:59 +00:00
|
|
|
|
|
|
|
|
// If browser does not capture in given timeout [ms], kill it
|
|
|
|
|
captureTimeout : 5000,
|
|
|
|
|
|
|
|
|
|
// Continuous Integration mode
|
|
|
|
|
// if true, it capture browsers, run tests and exit
|
|
|
|
|
singleRun : true
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|