Skip to content

Commit

Permalink
fix(preprocessor): Reset coverageObjRegex before each use
Browse files Browse the repository at this point in the history
  • Loading branch information
terussell85 authored and dignifiedquire committed Sep 8, 2015
1 parent 877aeeb commit ef3f45c
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 ef3f45c

Please sign in to comment.