Skip to content
Permalink
Browse files

test: improve test-fs-open

If there is a file 'path' in the root dir, the test
will fail with the 'ENOTDIR' instead of 'ENOENT'.
Change path to something more unlikely.

PR-URL: #30280
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
artmaks authored and MylesBorins committed Nov 6, 2019
1 parent 3d7882e commit 4dfcc12666e9e898f952600cd9066e81d04f9efe
Showing with 1 addition and 1 deletion.
  1. +1 −1 test/parallel/test-fs-open.js
@@ -29,7 +29,7 @@ let caughtException = false;
try {
// Should throw ENOENT, not EBADF
// see https://github.com/joyent/node/pull/1228
fs.openSync('/path/to/file/that/does/not/exist', 'r');
fs.openSync('/8hvftyuncxrt/path/to/file/that/does/not/exist', 'r');
} catch (e) {
assert.strictEqual(e.code, 'ENOENT');
caughtException = true;

0 comments on commit 4dfcc12

Please sign in to comment.
You can’t perform that action at this time.