Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 authored Jan 11, 2024
1 parent 451918d commit 7565f63
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/fixtures/permission/fs-write.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ const absoluteProtectedFolder = path.resolve(relativeProtectedFolder);
});
assert.throws(() => {
fs.writeFile(blockedFileURL, 'example', () => {});
}, common.expectsError({
}, {
code: 'ERR_ACCESS_DENIED',
permission: 'FileSystemWrite',
resource: path.toNamespacedPath(blockedFile),
}));
});
assert.throws(() => {
fs.writeFile(relativeProtectedFile, 'example', () => {});
}, {
Expand Down Expand Up @@ -101,11 +101,11 @@ const absoluteProtectedFolder = path.resolve(relativeProtectedFolder);
});
assert.throws(() => {
fs.utimes(blockedFileURL, new Date(), new Date(), () => {});
}, common.expectsError({
}, {
code: 'ERR_ACCESS_DENIED',
permission: 'FileSystemWrite',
resource: path.toNamespacedPath(blockedFile),
}));
});
assert.throws(() => {
fs.utimes(relativeProtectedFile, new Date(), new Date(), () => {});
}, {
Expand Down Expand Up @@ -134,11 +134,11 @@ const absoluteProtectedFolder = path.resolve(relativeProtectedFolder);
});
assert.throws(() => {
fs.lutimes(blockedFileURL, new Date(), new Date(), () => {});
}, common.expectsError({
}, {
code: 'ERR_ACCESS_DENIED',
permission: 'FileSystemWrite',
resource: path.toNamespacedPath(blockedFile),
}));
});
}

// fs.mkdir
Expand Down Expand Up @@ -195,11 +195,11 @@ const absoluteProtectedFolder = path.resolve(relativeProtectedFolder);
fs.rename(blockedFileURL, path.join(blockedFile, 'renamed'), (err) => {
assert.ifError(err);
});
}, common.expectsError({
}, {
code: 'ERR_ACCESS_DENIED',
permission: 'FileSystemWrite',
resource: path.toNamespacedPath(blockedFile),
}));
});
assert.throws(() => {
fs.rename(relativeProtectedFile, path.join(relativeProtectedFile, 'renamed'), (err) => {
assert.ifError(err);
Expand Down

0 comments on commit 7565f63

Please sign in to comment.