Skip to content

Commit

Permalink
test: improve test-fs-open
Browse files Browse the repository at this point in the history
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 BridgeAR committed Nov 19, 2019
1 parent d648c93 commit 0d12e9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-fs-open.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0d12e9c

Please sign in to comment.