From 9984e83d1e01189c3e5a1bf8d7d3b5d8f3aa10f2 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 14 Mar 2026 00:39:27 +0000 Subject: [PATCH] test: tighten path guard helper coverage --- src/infra/path-guards.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/infra/path-guards.test.ts b/src/infra/path-guards.test.ts index 8882e2ecec8..335d86f639e 100644 --- a/src/infra/path-guards.test.ts +++ b/src/infra/path-guards.test.ts @@ -31,6 +31,9 @@ describe("normalizeWindowsPathForComparison", () => { expect(normalizeWindowsPathForComparison("\\\\?\\UNC\\Server\\Share\\Folder")).toBe( "\\\\server\\share\\folder", ); + expect(normalizeWindowsPathForComparison("\\\\?\\unc\\Server\\Share\\Folder")).toBe( + "\\\\server\\share\\folder", + ); }); }); @@ -48,11 +51,13 @@ describe("node path error helpers", () => { expect(isNotFoundPathError({ code: "ENOENT" })).toBe(true); expect(isNotFoundPathError({ code: "ENOTDIR" })).toBe(true); expect(isNotFoundPathError({ code: "EACCES" })).toBe(false); + expect(isNotFoundPathError({ code: 404 })).toBe(false); expect(isSymlinkOpenError({ code: "ELOOP" })).toBe(true); expect(isSymlinkOpenError({ code: "EINVAL" })).toBe(true); expect(isSymlinkOpenError({ code: "ENOTSUP" })).toBe(true); expect(isSymlinkOpenError({ code: "ENOENT" })).toBe(false); + expect(isSymlinkOpenError({ code: null })).toBe(false); }); });