I have the following karma.config.js
that is based on this
module.exports = function (config) {
config.set({
basePath: '',
files: ['**/*spec.ts'],
frameworks: ['jasmine'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
I can not understand why that the report says that there was execute 0 tests. I'm sure that I have some files in my src folder that has the spec.ts
extension.
Chrome 68.0.3440 (Windows 10.0.0): Executed 0 of 0 ERROR (0.079 secs / 0 secs)
Any one has any idea what may be the issue?
In the context of this answer I realise that I didn't the follwoing files in my project:
I haven't realize early because this is a project that is install on another project. This means that I never had the need of running this project as a stand alone application.
To solve this issue, what I did was:
ng new my-app