cleanup-coverage-code
Cleanup ugly code added by code coverage tools during the test process. Like this one `__cov_Ejgcx$XN18CSfmeWn$f7vQ.f['2']++;`.
Last updated 12 years ago by tunnckocore .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install cleanup-coverage-code 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.3                                ...           latest (12 years ago)

5 Versions

  • 1.0.3                                ...           12 years ago
  • 1.0.2                                ...           12 years ago
  • 1.0.1                                ...           12 years ago
  • 1.0.0                                ...           12 years ago
  • 0.0.0                                ...           12 years ago
Maintainers (1)
Downloads
Total 16
Today 0
This Week 0
This Month 6
Last Day 0
Last Week 2
Last Month 5
Dependencies (1)
Dev Dependencies (3)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE