test: expand test coverage and extract worktree logic into testable module (#108)

Add comprehensive tests for worktree parsing, GitHub check status derivation,
hooks YAML parsing, persistence store, layout serialization, store cascades,
and terminal helpers. Extract pure functions from worktrees.ts into
worktree-logic.ts for better testability.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jinjing
2026-03-25 22:34:20 -07:00
committed by GitHub
co-authored by Claude Opus 4.6
parent 951ab72d7b
commit 69978c93f5
15 changed files with 2212 additions and 109 deletions
+2 -2
View File
@@ -185,7 +185,7 @@ export async function updatePRTitle(
}
}
function mapCheckStatus(state: string): PRCheckDetail['status'] {
export function mapCheckStatus(state: string): PRCheckDetail['status'] {
const s = state?.toUpperCase()
if (s === 'PENDING' || s === 'QUEUED') {
return 'queued'
@@ -196,7 +196,7 @@ function mapCheckStatus(state: string): PRCheckDetail['status'] {
return 'completed'
}
function mapCheckConclusion(state: string): PRCheckDetail['conclusion'] {
export function mapCheckConclusion(state: string): PRCheckDetail['conclusion'] {
const s = state?.toUpperCase()
if (s === 'SUCCESS' || s === 'PASS') {
return 'success'