I am using angular cli version 1.4.5 and below is the karma.conf.ts file
module.exports = function (config) {
config.set({
basePath: '',
exclude: [
"src/app/components/panel/panel.component.spec.ts",
"src/app/components/accordion/accordion.component.spec.ts"
],
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
client:{
clearContext: false
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.DEBUG,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
and I even added the exclude in the tsconfig.spec.json file to exclude to pick those files for test.
{
.....,
"include": [
"**/*.spec.ts",
"**/*.d.ts"
],
"exclude": [
"app/components/panel/panel.component.spec.ts",
"app/components/accordion/accordion.component.spec.ts"
]
}
is that am missing something to add for exclusion ?