2016-04-22 08:34:11 +00:00
|
|
|
module.exports = function(config) {
|
2016-04-23 02:19:25 +00:00
|
|
|
config.set({
|
|
|
|
basePath : '..',
|
|
|
|
plugins : ['karma-requirejs',
|
|
|
|
'karma-coverage',
|
|
|
|
'karma-phantomjs-launcher',
|
2016-11-17 18:05:26 +00:00
|
|
|
'karma-jasmine-ajax',
|
2016-04-23 02:19:25 +00:00
|
|
|
'karma-jasmine',
|
|
|
|
'karma-jshint',
|
|
|
|
'karma-mocha-reporter',
|
|
|
|
'karma-junit-reporter'
|
|
|
|
],
|
2016-11-17 18:05:26 +00:00
|
|
|
frameworks : [ 'jasmine-ajax', 'jasmine', 'requirejs' ],
|
2016-04-23 02:19:25 +00:00
|
|
|
files : [ {
|
|
|
|
pattern : 'es5-ff-spa-loader.js',
|
|
|
|
included : false
|
|
|
|
}, {
|
|
|
|
pattern : 'test/spec/**/*.js',
|
|
|
|
included : false
|
|
|
|
}, 'test/spec-runner.js' ],
|
|
|
|
browsers : [ 'PhantomJS' ],
|
|
|
|
preprocessors : {
|
|
|
|
'es5-ff-spa-loader.js' : [ 'jshint', 'coverage' ],
|
|
|
|
'example/**/*.js' : [ 'jshint' ],
|
|
|
|
'test/**/*.js' : [ 'jshint' ]
|
|
|
|
},
|
|
|
|
reporters : [ 'coverage', 'mocha', 'junit' ],
|
|
|
|
coverageReporter : {
|
|
|
|
dir : 'test/report',
|
|
|
|
reporters : [ {
|
|
|
|
type : 'lcov',
|
|
|
|
subdir : '.'
|
|
|
|
} ]
|
|
|
|
},
|
|
|
|
junitReporter : {
|
|
|
|
outputDir : 'test/report',
|
|
|
|
outputFile : 'TEST-karma.xml',
|
|
|
|
useBrowserName : false,
|
|
|
|
},
|
|
|
|
jshint : {
|
|
|
|
options : {
|
|
|
|
strict : true,
|
|
|
|
browser : true,
|
|
|
|
jasmine : true,
|
|
|
|
predef : [ 'define' ]
|
|
|
|
},
|
|
|
|
summary : true
|
|
|
|
}
|
|
|
|
});
|
2016-04-22 08:34:11 +00:00
|
|
|
};
|