From bd364a92e1939dac416014ff019151ca6c67a0c2 Mon Sep 17 00:00:00 2001 From: suraj-markup Date: Sat, 23 May 2026 21:29:47 +0530 Subject: [PATCH] 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) --- packages/cli/__tests__/commands/start.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/__tests__/commands/start.test.ts b/packages/cli/__tests__/commands/start.test.ts index cb6c978dc..f7223fec3 100644 --- a/packages/cli/__tests__/commands/start.test.ts +++ b/packages/cli/__tests__/commands/start.test.ts @@ -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 () => {