JSPM

cleanup-coverage-code

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 124
  • Score
    100M100P100Q78629F
  • License

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

Package Exports

  • cleanup-coverage-code

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cleanup-coverage-code) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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