test(cli): canonicalize tmpDir with realpathSync for macOS

The new "writes a flat local config and returns the global project
identity" test failed on macOS because os.tmpdir() returns /var/... while
the project path stored in the global registry is canonicalized to
/private/var/... by registerProjectInGlobalConfig and loadConfig. Wrap
the comparison operand in realpathSync to match the prior art in the
PR's own integration test (cli-first-run-config.integration.test.ts:31).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
suraj-markup 2026-05-23 21:29:47 +05:30
parent f75083e680
commit bd364a92e1
1 changed files with 1 additions and 1 deletions

View File

@ -2429,7 +2429,7 @@ describe("start command — autoCreateConfig", () => {
expect(projectIds).toHaveLength(1);
expect(config.configPath).toBe(configPath);
expect(Object.keys(config.projects)).toEqual(projectIds);
expect(config.projects[projectIds[0]!]!.path).toBe(tmpDir);
expect(config.projects[projectIds[0]!]!.path).toBe(realpathSync(tmpDir));
});
it("removes the flat local config when global registration fails", async () => {