$ npm install lcov-result-merger
When you have multiple test suites for the same application you still want to have the code coverage across all testsuites.
This tool will handle this for you.
./node_modules/.bin/lcov-result-merger 'FILE_PATTERN' ['OUTPUT_FILE']
build/coverage/coverage_X.log
./node_modules/.bin/lcov-result-merger 'build/coverage/coverage_*.log'
build/coverage/coverage_X.log
./node_modules/.bin/lcov-result-merger 'build/coverage/coverage_*.log' 'target/coverage/coverage_merged.log'
Modify source file paths to be relative to the working directory that the merge operation was run in. Useful in monorepos where each child package gathers its own metrics.
./node_modules/.bin/lcov-result-merger 'FILE_PATTERN' ['OUTPUT_FILE'] --prepend-source-files
Since coverage output is rarely written directly into the project root, use --prepend-path-fix
to describe the
relative path between the lcov file and the project root. The default simply points to one directory up, "..", which
works well for common tools such as NYC that write to a /coverage
directory.
./node_modules/.bin/lcov-result-merger 'FILE_PATTERN' ['OUTPUT_FILE'] --prepend-source-files --prepend-path-fix "../src"
© 2010 - cnpmjs.org x YWFE | Home | YWFE