coverage-code-regex
Regular expression (regex) for matching ugly code that coverage tools add 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 coverage-code-regex 
SYNC missed versions from official npm registry.

npm mit license build status coverage status

Regular expression (regex) for matching ugly code that coverage tools add during the test process. Like this one __cov_Ejgcx$XN18CSfmeWn$f7vQ.f['2']++;

Install

npm i --save coverage-code-regex
npm test

Usage

For more use-cases see the tests

var coverageCodeRegex = require('coverage-code-regex');

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

coverageCodeRegex().test('var a = [1,2,3]; var b = 123;');
//=> false

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, January 28, 2015

Current Tags

  • 1.0.2                                ...           latest (12 years ago)

4 Versions

  • 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 17
Today 1
This Week 2
This Month 10
Last Day 0
Last Week 2
Last Month 4
Dependencies (0)
None
Dev Dependencies (3)
Dependents (1)

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