Skip to content

Commit 7feebe6

Browse files
committed
test: apply review changes
1 parent 3aaa707 commit 7feebe6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/parallel/test-fs-watch-enoent.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ tmpdir.refresh();
4646
{
4747
assert.throws(
4848
() => fs.watch(nonexistentFile, { throwIfNoEntry: true }, common.mustNotCall()),
49-
(err) => {
50-
assert.strictEqual(err.path, nonexistentFile);
51-
assert.strictEqual(err.filename, nonexistentFile);
52-
return err.code === 'ENOENT' || err.code === 'ENODEV';
49+
{
50+
path: nonexistentFile,
51+
filename: nonexistentFile,
52+
code: /^(ENOENT|ENODEV)$/,
5353
},
5454
);
5555
}
@@ -58,7 +58,7 @@ tmpdir.refresh();
5858
if (common.isAIX) {
5959
assert.throws(
6060
() => fs.watch(nonexistentFile, { throwIfNoEntry: false }, common.mustNotCall()),
61-
(err) => err.code === 'ENODEV',
61+
{ code: 'ENODEV' },
6262
);
6363
} else {
6464
const watcher = fs.watch(nonexistentFile, { throwIfNoEntry: false }, common.mustNotCall());

0 commit comments

Comments
 (0)