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 targos committed Dec 1, 2019
1 parent 56b3205 commit 1f54cf5
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 1f54cf5

Please sign in to comment.