diff --git a/lib/preprocessor.js b/lib/preprocessor.js index 54f6075..db988c8 100644 --- a/lib/preprocessor.js +++ b/lib/preprocessor.js @@ -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) {