Skip to content

Commit 1f51686

Browse files
committed
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 <rafael.nunu@hotmail.com>
1 parent cede7e6 commit 1f51686

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

‎test/fixtures/permission/fs-read.js‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,6 @@ const regularFile = __filename;
7676
permission: 'FileSystemRead',
7777
resource: path.toNamespacedPath(blockedFile),
7878
})).then(common.mustCall());
79-
80-
assert.rejects(() => {
81-
return new Promise((_resolve, reject) => {
82-
const stream = fs.createReadStream(blockedFile);
83-
stream.on('error', reject);
84-
});
85-
}, common.expectsError({
86-
code: 'ERR_ACCESS_DENIED',
87-
permission: 'FileSystemRead',
88-
resource: path.toNamespacedPath(blockedFile),
89-
})).then(common.mustCall());
9079
}
9180

9281
// fs.stat
@@ -711,11 +700,6 @@ const regularFile = __filename;
711700
}, common.expectsError({
712701
code: 'ERR_ACCESS_DENIED',
713702
}));
714-
assert.throws(() => {
715-
fs.lstatSync(bufferBlockedFile);
716-
}, common.expectsError({
717-
code: 'ERR_ACCESS_DENIED',
718-
}));
719703

720704
// doesNotThrow
721705
fs.lstat(regularFile, (err) => {

0 commit comments

Comments
 (0)