From ef09f9f708b4036305eb078eb66c49e0c405c040 Mon Sep 17 00:00:00 2001 From: carlos-alm <127798846+carlos-alm@users.noreply.github.com> Date: Mon, 16 Mar 2026 19:04:09 -0600 Subject: [PATCH] test: add findRepoRoot and findDbPath ceiling boundary tests --- tests/unit/db.test.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/unit/db.test.js b/tests/unit/db.test.js index a1be6c4b..fd0a595c 100644 --- a/tests/unit/db.test.js +++ b/tests/unit/db.test.js @@ -321,10 +321,11 @@ describe('findDbPath with git ceiling', () => { try { _resetRepoRootCache(); const result = findDbPath(); - // Verify the DB was found (file exists) and is the worktree DB, not the outer one + // Avoid exact path comparison — realpathSync doesn't resolve Windows + // 8.3 short names (RUNNER~1 vs runneradmin) on CI. Instead verify + // existence, suffix, and that it's not the outer directory's DB. expect(fs.existsSync(result)).toBe(true); expect(result).toMatch(/\.codegraph[/\\]graph\.db$/); - // The outer DB is at outerDir/.codegraph — verify we didn't find that one expect(result).not.toContain(`${path.basename(outerDir)}${path.sep}.codegraph`); } finally { process.cwd = origCwd;