2
0
Fork 0
es5-ff-spa-loader/test/karma.conf.js

63 lines
1.9 KiB
JavaScript
Raw Normal View History

2016-04-22 08:34:11 +00:00
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: {
2016-04-23 01:58:27 +00:00
'es5-ff-spa-loader.js': ['jshint','coverage'],
'example/**/*.js': ['jshint'],
'test/**/*.js': ['jshint']
2016-04-22 08:34:11 +00:00
},
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
},
2016-04-23 01:17:50 +00:00
jshint: {
options: {
2016-04-23 01:58:27 +00:00
strict: true,
2016-04-23 01:17:50 +00:00
browser: true,
2016-04-23 01:58:27 +00:00
jasmine: true,
predef: ['define']
2016-04-23 01:17:50 +00:00
},
summary: true
},
2016-04-22 08:34:11 +00:00
plugins: [
'karma-requirejs',
'karma-coverage',
'karma-phantomjs-launcher',
'karma-jasmine',
2016-04-23 01:17:50 +00:00
'karma-jshint',
2016-04-22 08:34:11 +00:00
'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']
});
};