From 9ec74c9aa951cb6a7d12d1e60c028b47de2c7220 Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Sat, 22 Oct 2022 19:51:15 +0530 Subject: [PATCH] fixup! test: add comment --- test/parallel/test-vfs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-vfs.js b/test/parallel/test-vfs.js index 0140d9b4050f7d..c4842be3a839d0 100644 --- a/test/parallel/test-vfs.js +++ b/test/parallel/test-vfs.js @@ -39,7 +39,6 @@ common.expectWarning( process.on('warning', common.mustCall()); const originalStat = Module._stat; -// TODO(aduh95): We'd like to have a better way to achieve this without monkey-patching. Module._stat = function(filename) { if (!filename.startsWith(process.execPath)) { return originalStat(filename); @@ -60,6 +59,7 @@ Module._stat = function(filename) { }; const originalReadFileSync = fs.readFileSync; +// TODO(aduh95): We'd like to have a better way to achieve this without monkey-patching fs. fs.readFileSync = function readFileSync(pathArgument, options) { if (!pathArgument.startsWith(process.execPath)) { return originalReadFileSync.apply(this, arguments);