From 5af7f979274312873baf85d57c481be34d974640 Mon Sep 17 00:00:00 2001 From: Andrew Finlay Date: Thu, 21 Feb 2019 15:29:15 +1100 Subject: [PATCH] Debug testing So the exclude negated node_modules test worked last time, but the debug out triggered a different test failure. If this works how I think, it should fail the exclude negated test but pass the source-maps --all test --- index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 6faf6014c..7d68754c6 100755 --- a/index.js +++ b/index.js @@ -255,9 +255,10 @@ NYC.prototype.walkAllFiles = function (dir, visitor) { ) const filesLessExcludes = glob.sync(sourceGlob, { cwd: dir, nodir: true, ignore: this.exclude.exclude }) - console.log(`unExcludeFiles: ${unExcludeFiles}`) + const allFiles = filesLessExcludes.concat(unExcludeFiles) + const uniqFiles = arrayUniq(allFiles) - return arrayUniq(filesLessExcludes.concat(unExcludeFiles)).forEach(visitor) + return uniqFiles.forEach(visitor) } NYC.prototype._maybeInstrumentSource = function (code, filename, relFile) {