Closed ecsunder15 closed 6 years ago
I ran the build in -debug
this morning, and found that there was a section of my code that had specific reporters for a travis environment. Added the coverage/
directory there and the CC data was sent over fine. In the future, I would note that if there are any travis-specific instructions or configs outside of travis.yml, they need to include the coverage reporter.
if (process.env.TRAVIS) {
config.set({
reporters: ['jasmine-diff', 'spec', 'coverage'] ,
coverageReporter: {
type: 'lcov',
dir: 'coverage/',
subdir: '.'
},
colors: true,
});
}
I currently have a project that is an ES6 javascript project that has local coverage with
babel-plugin-istanbul
andkarma-coverage
working and generating an lcov format report on the top level directory. Thenpm test
command generates the lcov coverage report. After running the build on Travis with exit code 0, I get the error, "could not find any viable formatter. available formatters: simplecov, lcov, coverage.py, clover, gocov, gcov, cobertura, jacoco". I have set up mytravis.yml
as follows:Here are my
karma.config.js
reporters:Is there a reason as to why the CC reporter cannot find my files in Travis? I have followed the docs to get to this point and there seem to be few examples of Javascript projects using the CC code coverage tool.