lcov-autosourcemap

0.3.5 • Public • Published

Transform an LCOV file using sourcemaps.

This package will look for sourcemap files under the given source directory. The lcov file lists files that are covered. This package will look for sourcemaps with the name <file>.map.


Wat?

  • Run tests against transformed, concat'ed, etc. dist file
  • Get code coverage per source file

Install

Install with npm

npm install --save-dev lcov-autosourcemap

Usage

var lcovSourcemap = require("lcov-sourcemap");
lcovSourcemap("./coverage/lcov-raw.info", "./src").then(function (lcov) {
    // lcov string
});

lcovSourcemap.writeLcov("./coverage/lcov-raw.info", "./src", "./coverage/lcov.info").then(function () {
    // Done!
});

lcovSourcemap(lcovFilePath, sourceDir)

  • lcovFilePath (String): Lcov file.
  • sourceDir (String): Source directory to look for files (checks for existence).
  • return (Promise): Promise containing Lcov string

lcovSourcemap.writeLcov(lcovFilePath, sourcemaps, sourceDir, outputLcovFilePath)

  • Arguments similar to lcovSourceMap
  • outputLcovFilePath (String): Output lcov file path.
  • return (Promise): Resolves when write is complete

Package Sidebar

Install

npm i lcov-autosourcemap

Weekly Downloads

0

Version

0.3.5

License

MIT

Last publish

Collaborators

  • mjstevens777