Skip to content

Commit 0d12e9c

Browse files
artmaksBridgeAR
authored andcommitted
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>
1 parent d648c93 commit 0d12e9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-fs-open.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ let caughtException = false;
2929
try {
3030
// Should throw ENOENT, not EBADF
3131
// see https://github.com/joyent/node/pull/1228
32-
fs.openSync('/path/to/file/that/does/not/exist', 'r');
32+
fs.openSync('/8hvftyuncxrt/path/to/file/that/does/not/exist', 'r');
3333
} catch (e) {
3434
assert.strictEqual(e.code, 'ENOENT');
3535
caughtException = true;

0 commit comments

Comments
 (0)