2017-02-28 20:12:40 +01:00
|
|
|
// Karma configuration file, see link for more information
|
|
|
|
// https://karma-runner.github.io/0.13/config/configuration-file.html
|
|
|
|
|
|
|
|
module.exports = function (config) {
|
|
|
|
config.set({
|
|
|
|
basePath: '',
|
2017-03-24 06:22:36 +01:00
|
|
|
frameworks: ['jasmine', '@angular/cli'],
|
2017-02-28 20:12:40 +01:00
|
|
|
plugins: [
|
|
|
|
require('karma-jasmine'),
|
|
|
|
require('karma-chrome-launcher'),
|
2017-03-24 06:22:36 +01:00
|
|
|
require('karma-jasmine-html-reporter'),
|
|
|
|
require('karma-coverage-istanbul-reporter'),
|
|
|
|
require('@angular/cli/plugins/karma')
|
2017-02-28 20:12:40 +01:00
|
|
|
],
|
2017-03-24 06:22:36 +01:00
|
|
|
client:{
|
|
|
|
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
|
|
|
},
|
2017-02-28 20:12:40 +01:00
|
|
|
files: [
|
|
|
|
{ pattern: './src/test.ts', watched: false }
|
|
|
|
],
|
|
|
|
preprocessors: {
|
2017-03-24 06:22:36 +01:00
|
|
|
'./src/test.ts': ['@angular/cli']
|
2017-02-28 20:12:40 +01:00
|
|
|
},
|
|
|
|
mime: {
|
|
|
|
'text/x-typescript': ['ts','tsx']
|
|
|
|
},
|
2017-03-24 06:22:36 +01:00
|
|
|
coverageIstanbulReporter: {
|
|
|
|
reports: [ 'html', 'lcovonly' ],
|
|
|
|
fixWebpackSourcePaths: true
|
2017-02-28 20:12:40 +01:00
|
|
|
},
|
|
|
|
angularCli: {
|
|
|
|
environment: 'dev'
|
|
|
|
},
|
|
|
|
reporters: config.angularCli && config.angularCli.codeCoverage
|
2017-03-24 06:22:36 +01:00
|
|
|
? ['progress', 'coverage-istanbul']
|
|
|
|
: ['progress', 'kjhtml'],
|
2017-02-28 20:12:40 +01:00
|
|
|
port: 9876,
|
|
|
|
colors: true,
|
|
|
|
logLevel: config.LOG_INFO,
|
|
|
|
autoWatch: true,
|
|
|
|
browsers: ['Chrome'],
|
|
|
|
singleRun: false
|
|
|
|
});
|
|
|
|
};
|