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: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • 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.