Don't instrument any test code for coverage

This commit is contained in:
Charles Gagnon 2019-12-09 09:37:52 -08:00 committed by GitHub
parent eab8ca79dc
commit 34c591eeb3
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;
}