From 1f54cf5e348452ffb1e7601193dbb19f57a04b92 Mon Sep 17 00:00:00 2001 From: Artem Maksimov Date: Wed, 6 Nov 2019 13:23:27 +0300 Subject: [PATCH] test: improve test-fs-open MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: https://github.com/nodejs/node/pull/30280 Reviewed-By: Сковорода Никита Андреевич Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Ruben Bridgewater Reviewed-By: Trivikram Kamat --- test/parallel/test-fs-open.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-fs-open.js b/test/parallel/test-fs-open.js index 51cd9ecf319595..e33c4e9331a828 100644 --- a/test/parallel/test-fs-open.js +++ b/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;