GithubHelp home page GithubHelp logo

istanbul-sourcemap-report's Introduction

Istanbul coverage report source mapping utility

Build Status

Utility to generate coverage reports from compiled code coverage via SourceMaps.

Opinionated fork from remap-istanbul(https://github.com/SitePen/remap-istanbul).

My goals were following:

  • split to smaller, more maintainable files
  • change some implementation details, and interfaces I do not like
  • resolve some issues I have
  • change testing framework
  • update to es6
  • make better cli util

Also there is one big thing that need to be done - make unit test coverage, instead of functional as it is now. Have not done yet - just converted to jasmine.

BTW - I also removed grunt and gulp plugins from project, because I think it should be separate packages.

Usage

Install

npm install istanbul-sourcemap-report

CLI

istanbul-sourcemap-report ./coverage/coverage.json --json.file=./coverage/coverage-remapped.json --html.dir=./coverage/coverage-remapped

Possible options:

  • --exclude=<glob> - glob expression for files to exclude
  • --<report-type>.<option>=<value> - options for reporters
  • --<report-type> - enable report type (not required if there is options for report type)
  • everything else is treated as input coverage files

Node module

const remap = require('istanbul-sourcemap-report');

remap([
  // coverage files for mapping to sources
  './coverage/coverage.json'
], {
  // reporters configuration
  json: { file: './coverage/coverage-remapped.json' },
  html: { dir: './coverage/coverage-remapped' },
}, {
  // remapping options
  //    exclude?  - glob expression using minimatch
  //    readFile? - a function that can read a file
  //                syncronously
  //    readJSON? - a function that can read and parse a
  //                JSON file syncronously
  //    sources?  - a Istanbul store where inline sources will be
  //                added
  //    warn?     - a function that logs warnings
});

istanbul-sourcemap-report's People

Contributors

arma-gast avatar cookpete avatar ebaker avatar guybedford avatar jvanoostveen avatar kinday avatar kitsonk avatar lukeapage avatar mikedon avatar nmn avatar protectator avatar sohamkamani avatar steve-gray avatar zxbodya avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.