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

Don't instrument any test code for coverage
This commit is contained in:
Alexandru Dima 2020-01-14 11:10:51 +01:00 committed by GitHub
commit 4e5a05c3fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +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')) {
if (minimatch(source, '**/test/**')) {
// tests don't get instrumented
return contents;
}