Skip to content

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

License

Notifications You must be signed in to change notification settings

regexhq/coverage-code-regex

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy