Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

cleanup-coverage-code

tunnckoCore144MIT1.0.3

Cleanup ugly code added by code coverage tools during the test process. Like this one __cov_Ejgcx$XN18CSfmeWn$f7vQ.f['2']++;.

clean, cleans, cleanup, cleanups, code, codes, cov, coverage, coverages, coveralls, during, express, expression, expressions, function, functions, istanbul, lib, lib-cov, match, matching, name, process, re, regex, regexp, regexps, regular, test, tests, ugly

readme

npm mit license build status coverage status deps status

Cleanup ugly code (like this __cov_Ejgcx$XN18CSfmeWn$f7vQ.f['2']++;) added by code coverage tools during the test process.

Install

npm i --save cleanup-coverage-code
npm test

API

For more use-cases see the tests

cleanupCoverageCode

Cleans up the given code from code added by coverage tools.

  • <str> {String} code to cleanup
  • return {String} cleaned code

Example:

var cleanupCoverageCode = require('cleanup-coverage-code');

var fixture = "var a=[1,2,3];__cov_Ejgcx$XN18CSfmeWn$f7vQ.f['2']++;var b=123;";
cleanupCoverageCode(fixture);
//=> 'var a=[1,2,3];var b=123;'

cleanupCoverageCode('var a=[1,2,3];var b=123;');
//=> 'var a=[1,2,3];var b=123;'

Author

Charlike Mike Reagent

License MIT license

Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
Released under the MIT license.


Powered and automated by kdf, February 4, 2015

changelog

v1.0.3 / February 4, 2015

  • Release v1.0.3 / npm@v1.0.3
  • update readme
  • bump deps, remove mocha-lcov-reporter

v1.0.2 / January 28, 2015

  • Release v1.0.2 / npm@v1.0.2
  • add test for complex coverage code
  • bump coverage-code-regex@~1.0.2

v1.0.1 / January 28, 2015

  • Release v1.0.1 / npm@v1.0.1
  • update tests
  • bump coverage-code-regex@~1.0.1

v1.0.0 / January 28, 2015

  • Release v1.0.0 / npm@v1.0.0
  • add keywords
  • add docs

v0.0.0 / January 28, 2015