aodb/karma.conf.js
Martin Donnelly afe73b5baa upload
2016-12-22 00:00:06 +00:00

94 lines
3.2 KiB
JavaScript

// Karma configurationi
// Generated on Tue Apr 21 2015 09:09:36 GMT+0100 (GMT Daylight Time)
module.exports = function (config) {
var gulpConfig = require('./build/gulp.config')();
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['systemjs', 'jasmine'],
// list of files / patterns to load in the browser
files: gulpConfig.karma.files,
preprocessors: gulpConfig.karma.preprocessors,
// list of files to exclude
exclude: gulpConfig.karma.exclude,
systemjs: {
config: {
transpiler: 'babel',
defaultJSExtensions: true,
"baseURL": "./tests/compiled/",
"map": {
"app": './tests/compiled'
},
"paths": {
'systemjs': './../../jspm_packages/system.js',
'system-polyfills': './../../jspm_packages/system-polyfills.js',
'es6-module-loader': './../../node_modules/es6-module-loader/dist/es6-module-loader.js',
'phantomjs-polyfill': './../../node_modules/phantomjs-polyfill/bind-polyfill.js',
'moment': 'lib/moment.js'
}
}
},
reporters: ['progress', 'coverage'],
coverageReporter: {
reporters: gulpConfig.karma.coverage.reporters,
dir: gulpConfig.karma.coverage.dir
},
noResolve: false,
htmlReporter: {
outputDir: './report/unittests', // where to put the reports
templatePath: null, // set if you moved jasmine_template.html
focusOnFailures: true, // reports show failures on start
namedFiles: false, // name files instead of creating sub-directories
pageTitle: null, // page title for reports; browser info by default
urlFriendlyName: false // simply replaces spaces with _ for files/dirs
},
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// 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
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
//browsers: ['PhantomJS'],
browsers: ['PhantomJS'],
plugins: [
'karma-systemjs',
'karma-typescript-preprocessor',
'karma-chrome-launcher',
'karma-coverage',
'karma-html-reporter',
'karma-jasmine',
'karma-jasmine-html-reporter',
'karma-phantomjs-launcher',
'phantomjs'
],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true
});
};