From 1f51686ef56cc959832cfad46427e9b2929dc560 Mon Sep 17 00:00:00 2001 From: RafaelGSS Date: Thu, 1 Oct 2026 13:46:10 -0300 Subject: [PATCH] test: remove duplicated cases in permission fs-read fixture The fs.createReadStream(blockedFile) and fs.lstatSync(bufferBlockedFile) assertions were each present twice in the same block with identical arguments and expectations, so the second copy added no coverage. Signed-off-by: RafaelGSS --- test/fixtures/permission/fs-read.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/test/fixtures/permission/fs-read.js b/test/fixtures/permission/fs-read.js index 1ad12707ba55..511c9bf027b1 100644 --- a/test/fixtures/permission/fs-read.js +++ b/test/fixtures/permission/fs-read.js @@ -76,17 +76,6 @@ const regularFile = __filename; permission: 'FileSystemRead', resource: path.toNamespacedPath(blockedFile), })).then(common.mustCall()); - - assert.rejects(() => { - return new Promise((_resolve, reject) => { - const stream = fs.createReadStream(blockedFile); - stream.on('error', reject); - }); - }, common.expectsError({ - code: 'ERR_ACCESS_DENIED', - permission: 'FileSystemRead', - resource: path.toNamespacedPath(blockedFile), - })).then(common.mustCall()); } // fs.stat @@ -711,11 +700,6 @@ const regularFile = __filename; }, common.expectsError({ code: 'ERR_ACCESS_DENIED', })); - assert.throws(() => { - fs.lstatSync(bufferBlockedFile); - }, common.expectsError({ - code: 'ERR_ACCESS_DENIED', - })); // doesNotThrow fs.lstat(regularFile, (err) => {