Skip to content

armgit / Ix

Public Imported from GitHub
0

Understand any codebase instantly. System intelligence for codebases, built for humans and AI.

test(ingest): resolve the fixture repo as discovery does (realpathSync.native)

KageBinaryd9695e2ee6e0
diff --git a/ix-cli/src/cli/__tests__/ingest-files.test.ts b/ix-cli/src/cli/__tests__/ingest-files.test.ts
index cf943fbf..0099f82f 100644
--- a/ix-cli/src/cli/__tests__/ingest-files.test.ts
+++ b/ix-cli/src/cli/__tests__/ingest-files.test.ts
@@ -454,9 +454,12 @@ describe("ingestFiles against a fake backend", () => {
// on disk. Assigning the created path first means the variable always
// names whatever was created, resolved or not.
home = mkdtempSync(join(tmpdir(), "ix-ingest-home-"));
- home = realpathSync(home);
+ // `.native`, as discovery canonicalises: on Windows the temp dir is an 8.3
+ // name (RUNNER~1) that plain realpathSync keeps and `.native` expands, so
+ // paths built from `repo` would not match the ones ingest records.
+ home = realpathSync.native(home);
repo = mkdtempSync(join(tmpdir(), "ix-ingest-repo-"));
- repo = realpathSync(repo);
+ repo = realpathSync.native(repo);
const endpoint = await backend.start();
// HOME *and* USERPROFILE: `os.homedir()` reads the latter on Windows, so