2016-12-28 15:57:16 -05:00
|
|
|
module.exports = function (config)
|
|
|
|
{
|
|
|
|
config.set({
|
|
|
|
basePath: '',
|
2016-12-28 16:57:40 -05:00
|
|
|
frameworks: ['jasmine', 'angular-cli'],
|
|
|
|
plugins: [
|
|
|
|
require('karma-jasmine'),
|
|
|
|
require('karma-chrome-launcher'),
|
|
|
|
require('karma-remap-istanbul'),
|
|
|
|
require('karma-mocha-reporter'),
|
|
|
|
require('angular-cli/plugins/karma')
|
2016-12-28 15:57:16 -05:00
|
|
|
],
|
2016-12-28 16:57:40 -05:00
|
|
|
files: [
|
|
|
|
{ pattern: './src/**/*.spec.ts', watched: false }
|
2016-12-28 15:57:16 -05:00
|
|
|
],
|
|
|
|
preprocessors: {
|
2016-12-28 16:57:40 -05:00
|
|
|
'./src/**/*.spec.ts': ['angular-cli']
|
2016-12-28 15:57:16 -05:00
|
|
|
},
|
2016-12-28 16:57:40 -05:00
|
|
|
mime: {
|
|
|
|
'text/x-typescript': ['ts', 'tsx']
|
|
|
|
},
|
|
|
|
remapIstanbulReporter: {
|
|
|
|
reports: {
|
|
|
|
html: 'coverage',
|
|
|
|
lcovonly: './coverage/coverage.lcov'
|
2016-12-28 15:57:16 -05:00
|
|
|
}
|
|
|
|
},
|
2016-12-28 16:57:40 -05:00
|
|
|
angularCli: {
|
|
|
|
config: './angular-cli.json',
|
|
|
|
environment: 'dev'
|
|
|
|
},
|
|
|
|
reporters: config.angularCli && config.angularCli.codeCoverage
|
|
|
|
? ['mocha', 'karma-remap-istanbul']
|
|
|
|
: ['mocha'],
|
2016-12-28 15:57:16 -05:00
|
|
|
port: 9876,
|
|
|
|
colors: true,
|
2016-12-28 16:57:40 -05:00
|
|
|
logLevel: config.LOG_INFO,
|
2016-12-28 15:57:16 -05:00
|
|
|
autoWatch: true,
|
|
|
|
browsers: ['Chrome'],
|
2016-12-28 16:57:40 -05:00
|
|
|
singleRun: false
|
|
|
|
});
|
|
|
|
};
|