From 57bdf42a8825242dfaf8ddc42c6bd28d9d8b72a6 Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Wed, 29 May 2024 22:26:09 -0700 Subject: [PATCH] Tests262: fixed unstable fs test. Ensuring that symlink file is removed even if regular file does not exist. --- test/fs/methods.t.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/fs/methods.t.js b/test/fs/methods.t.js index 8077c0c0d..1d177e187 100644 --- a/test/fs/methods.t.js +++ b/test/fs/methods.t.js @@ -484,7 +484,8 @@ let stat_tests = () => [ /* making symbolic link. */ - try { fs.unlinkSync(fname); fs.unlinkSync(lname); } catch (e) {} + try { fs.unlinkSync(fname); } catch (e) {} + try { fs.unlinkSync(lname); } catch (e) {} fs.writeFileSync(fname, fname);