Skip to content

Commit

Permalink
test: fix error code typo
Browse files Browse the repository at this point in the history
PR-URL: #27024
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
cjihrig authored and BethGriggs committed Apr 4, 2019
1 parent a64b5dd commit ad27c2d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/known_issues/test-fs-copyfile-respect-permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ function beforeEach() {
fs.chmodSync(dest, '444');

const check = (err) => {
assert.strictEqual(err.code, 'EACCESS');
assert.strictEqual(err.code, 'EACCES');
assert.strictEqual(fs.readFileSync(dest, 'utf8'), 'dest');
return true;
};

return { source, dest, check };
Expand All @@ -39,8 +40,9 @@ function beforeEach() {
// Test promises API.
{
const { source, dest, check } = beforeEach();
assert.throws(async () => { await fs.promises.copyFile(source, dest); },
check);
(async () => {
await assert.rejects(fs.promises.copyFile(source, dest), check);
})();
}

// Test callback API.
Expand Down

0 comments on commit ad27c2d

Please sign in to comment.