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 committed Aug 19, 2015
1 parent c65074b commit d932d63
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 @@ -123,6 +123,9 @@ function createCoveragePreprocessor (logger, helper, basePath, reporters, covera
sourceCache[file.originalPath] = content

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

var coverageObjMatch = coverageObjRegex.exec(instrumentedCode)

if (coverageObjMatch !== null) {
Expand Down

0 comments on commit d932d63

Please sign in to comment.