Skip to content

Commit

Permalink
Merge pull request #176 from terussell85/master
Browse files Browse the repository at this point in the history
fix(preprocessor) Reset coverageObjRegex before each use
  • Loading branch information
dignifiedquire committed Sep 8, 2015
2 parents 877aeeb + d932d63 commit fec0b75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ function createCoveragePreprocessor (logger, helper, basePath, reporters, covera
sourceCache[jsPath] = content

if (includeAllSources) {
// reset stateful regex
coverageObjRegex.lastIndex = 0

var coverageObjMatch = coverageObjRegex.exec(instrumentedCode)

if (coverageObjMatch !== null) {
Expand Down

0 comments on commit fec0b75

Please sign in to comment.