mirror of
https://github.com/NeuralNomadsAI/CodeNomad.git
synced 2026-07-10 00:14:27 +00:00
fix(server): strengthen workspace root regression test
This commit is contained in:
parent
fc48826f86
commit
28a2df20ca
2 changed files with 3 additions and 2 deletions
|
|
@ -52,7 +52,7 @@ export interface WorkspaceDeleteResponse {
|
|||
export type WorktreeKind = "root" | "worktree"
|
||||
|
||||
export interface WorktreeDescriptor {
|
||||
/** Stable identifier used by CodeNomad + clients ("root" for repo root). */
|
||||
/** Stable identifier used by CodeNomad + clients ("root" for the selected workspace folder). */
|
||||
slug: string
|
||||
/** Absolute directory path on the server host. */
|
||||
directory: string
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ describe("listWorktrees", () => {
|
|||
"HEAD 1111111",
|
||||
"branch refs/heads/main",
|
||||
"",
|
||||
].join("\\n")
|
||||
].join("\n")
|
||||
|
||||
if (process.platform === "win32") {
|
||||
writeFileSync(gitPath, `@echo off\r\nif "%1"=="worktree" if "%2"=="list" if "%3"=="--porcelain" (\r\necho ${porcelain.replace(/\n/g, "\r\necho ")}\r\nexit /b 0\r\n)\r\nexit /b 1\r\n`)
|
||||
|
|
@ -38,6 +38,7 @@ describe("listWorktrees", () => {
|
|||
assert.equal(worktrees[0]?.slug, "root")
|
||||
assert.equal(worktrees[0]?.directory, workspaceFolder)
|
||||
assert.equal(worktrees[0]?.kind, "root")
|
||||
assert.equal(worktrees[0]?.branch, "main")
|
||||
assert.notEqual(worktrees[0]?.directory, repoRoot)
|
||||
} finally {
|
||||
process.env.PATH = originalPath
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue