Skip to content

Commit

Permalink
squash! more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cjihrig committed Mar 31, 2019
1 parent 124e637 commit 95c9204
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/known_issues/test-fs-copyfile-respect-permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function beforeEach() {
const check = (err) => {
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 95c9204

Please sign in to comment.