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:
co-authored by
Claude Opus 4.6
parent
951ab72d7b
commit
69978c93f5
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user