Skip to content

Commit

Permalink
Fixed assert
Browse files Browse the repository at this point in the history
  • Loading branch information
lucamaraschi committed Jan 20, 2018
1 parent cc739e1 commit 61d47f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/parallel/test-fs-fchmod.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@ const fs = require('fs');

// Check for mode values range
const modeUpperBoundaryValue = 0o777;
common.mustCall(() => fs.fchmod(1, modeUpperBoundaryValue));
common.mustCall(() => fs.fchmodSync(1, modeUpperBoundaryValue));
fs.fchmod(1, modeUpperBoundaryValue);
fs.fchmodSync(1, modeUpperBoundaryValue);

// umask of 0o777 is equal to 775
const modeOutsideUpperBoundValue = 776;
common.expectsError(
() => fs.fchmod(1, i),
() => fs.fchmod(1, modeOutsideUpperBoundValue),
{
code: 'ERR_OUT_OF_RANGE',
type: RangeError,
message: 'The value of "mode" is out of range.'
}
);
common.expectsError(
() => fs.fchmodSync(1, i),
() => fs.fchmodSync(1, modeOutsideUpperBoundValue),
{
code: 'ERR_OUT_OF_RANGE',
type: RangeError,
Expand Down

0 comments on commit 61d47f2

Please sign in to comment.