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
Next Next commit
test: fix error code typo
PR-URL: #27024
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
cjihrig authored and MylesBorins committed May 20, 2019
commit b81c82af8178b97d47ea2c99e0a9dc90a3567c1e
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