Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add missing await + async on calls to chmod(), fchmod()
  • Loading branch information
humphd committed Apr 30, 2018
commit d1ac66f0bf6af5b9e39cb463a12aed778b77bfa3
8 changes: 4 additions & 4 deletions test/parallel/test-fs-promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,25 +106,25 @@ function verifyStatObject(stat) {

await chmod(dest, 0o666);
await fchmod(handle, 0o666);
handle.chmod(0o666);
await handle.chmod(0o666);

// `mode` can't be > 0o777
assert.rejects(
() => chmod(handle, (0o777 + 1)),
async () => chmod(handle, (0o777 + 1)),
{
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError [ERR_INVALID_ARG_TYPE]'
}
);
assert.rejects(
() => fchmod(handle, (0o777 + 1)),
async () => fchmod(handle, (0o777 + 1)),
{
code: 'ERR_OUT_OF_RANGE',
name: 'RangeError [ERR_OUT_OF_RANGE]'
}
);
assert.rejects(
() => handle.chmod(handle, (0o777 + 1)),
async () => handle.chmod(handle, (0o777 + 1)),
{
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError [ERR_INVALID_ARG_TYPE]'
Expand Down