50 lines
1.7 KiB
JavaScript
50 lines
1.7 KiB
JavaScript
module.exports = function(config) {
|
|
config.set({
|
|
basePath: '..',
|
|
frameworks: ['jasmine', 'requirejs'],
|
|
files: [{
|
|
pattern: 'es5-ff-spa-loader.js',
|
|
included: false
|
|
}, {
|
|
pattern: 'test/spec/**/*.js',
|
|
included: false
|
|
},
|
|
'test/spec-runner.js'],
|
|
|
|
preprocessors: {
|
|
'es5-ff-spa-loader.js': ['coverage']
|
|
},
|
|
reporters: ['coverage', 'mocha', 'junit'],
|
|
|
|
// the default configuration
|
|
junitReporter: {
|
|
outputDir: 'test/data/coverage', // results will be saved as $outputDir/$browserName.xml
|
|
outputFile: undefined, // if included, results will be saved as $outputDir/$browserName/$outputFile
|
|
suite: '', // suite will become the package name attribute in xml testsuite element
|
|
useBrowserName: false, // add browser name to report and classes names
|
|
nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
|
|
classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element,
|
|
properties: {} // key value pair of properties to add to the <properties> section of the report
|
|
},
|
|
|
|
plugins: [
|
|
'karma-requirejs',
|
|
'karma-coverage',
|
|
'karma-phantomjs-launcher',
|
|
'karma-jasmine',
|
|
'karma-mocha-reporter',
|
|
'karma-junit-reporter'
|
|
],
|
|
|
|
coverageReporter: {
|
|
// specify a common output directory
|
|
dir: 'test/data/coverage',
|
|
reporters: [
|
|
{ type: 'lcov', subdir: 'report-lcov' },
|
|
{ type: 'lcovonly', subdir: '.', file: 'report-lcovonly.txt' }
|
|
]
|
|
},
|
|
|
|
browsers: ['PhantomJS']
|
|
});
|
|
}; |