Don't instrument any test code for coverage (#8598)

This commit is contained in:
Charles Gagnon
2019-12-09 09:01:10 -08:00
committed by GitHub
parent 62565e0577
commit 42ff30515c

View File

@@ -17,8 +17,7 @@ const REPO_PATH = toUpperDriveLetter(path.join(__dirname, '..'));
exports.initialize = function (loaderConfig) {
const instrumenter = iLibInstrument.createInstrumenter();
loaderConfig.nodeInstrumenter = function (contents, source) {
if (minimatch(source, '**/test/**/*.test.js')) {
// tests don't get instrumented
if (minimatch(source, '**/test/**')) { // {{SQL CARBON EDIT}} Don't instrument test helper stuff either
return contents;
}
// Try to find a .map file