2017-01-27 03:20:51 -05: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-02-02 19:04:25 -05:00
|
|
|
frameworks: ['jasmine', '@angular/cli'],
|
2017-01-27 03:20:51 -05:00
|
|
|
plugins: [
|
|
|
|
require('karma-jasmine'),
|
|
|
|
require('karma-chrome-launcher'),
|
|
|
|
require('karma-remap-istanbul'),
|
2017-02-02 19:04:25 -05:00
|
|
|
require('@angular/cli/plugins/karma')
|
2017-01-27 03:20:51 -05:00
|
|
|
],
|
|
|
|
files: [
|
|
|
|
{ pattern: './src/test.ts', watched: false }
|
|
|
|
],
|
|
|
|
preprocessors: {
|
2017-02-02 19:04:25 -05:00
|
|
|
'./src/test.ts': ['@angular/cli']
|
2017-01-27 03:20:51 -05:00
|
|
|
},
|
|
|
|
mime: {
|
|
|
|
'text/x-typescript': ['ts','tsx']
|
|
|
|
},
|
|
|
|
remapIstanbulReporter: {
|
|
|
|
reports: {
|
|
|
|
html: 'coverage',
|
|
|
|
lcovonly: './coverage/coverage.lcov'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
angularCli: {
|
|
|
|
config: './angular-cli.json',
|
|
|
|
environment: 'dev'
|
|
|
|
},
|
|
|
|
reporters: config.angularCli && config.angularCli.codeCoverage
|
|
|
|
? ['progress', 'karma-remap-istanbul']
|
|
|
|
: ['progress'],
|
|
|
|
port: 9876,
|
|
|
|
colors: true,
|
|
|
|
logLevel: config.LOG_INFO,
|
|
|
|
autoWatch: true,
|
|
|
|
browsers: ['Chrome'],
|
|
|
|
singleRun: false
|
|
|
|
});
|
|
|
|
};
|