★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/57eb6b2129Nouvelle recherche | Portail wanayoo
Skip to content
Permalink
Browse files
test: fix error code typo
Backport-PR-URL: #27776
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
1 parent 25d73aa commit 57eb6b2129e2f240fe9ca2a675ceceee8f219193
Showing with 5 additions and 3 deletions.
  1. +5 −3 test/known_issues/test-fs-copyfile-respect-permissions.js
@@ -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 };
@@ -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.

0 comments on commit 57eb6b2

Please sign in to comment.