Skip to content

Commit 94240a6

Browse files
only21milclaude
andcommitted
test(server): cover non-origin remote cache invalidation via ensureRemote
Read status before any remote exists so the no-remote result is cached, then add the github remote through ensureRemote and assert the cached status flips to true. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent e8ec3b0 commit 94240a6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/server/src/vcs/GitVcsDriverCore.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ it.effect("treats a repository's only non-origin remote as its primary remote",
219219
const remote = yield* makeTmpDir("git-vcs-driver-remote-");
220220
yield* initRepoWithCommit(cwd);
221221
yield* git(remote, ["init", "--bare"]);
222-
yield* git(cwd, ["remote", "add", "github", remote]);
222+
assert.equal((yield* driver.statusDetailsLocal(cwd)).hasOriginRemote, false);
223+
yield* driver.ensureRemote({ cwd, preferredName: "github", url: remote });
223224

224225
assert.equal((yield* driver.statusDetailsLocal(cwd)).hasOriginRemote, true);
225226
assert.equal((yield* driver.listRefs({ cwd, refresh: true })).hasPrimaryRemote, true);

0 commit comments

Comments
 (0)