fix(boulder-state): missing plan file no longer reports isComplete=true
This commit is contained in:
@@ -888,7 +888,8 @@ describe("boulder-state", () => {
|
|||||||
const progress = getPlanProgress("/non/existent/file.md")
|
const progress = getPlanProgress("/non/existent/file.md")
|
||||||
// then
|
// then
|
||||||
expect(progress.total).toBe(0)
|
expect(progress.total).toBe(0)
|
||||||
expect(progress.isComplete).toBe(true)
|
expect(progress.completed).toBe(0)
|
||||||
|
expect(progress.isComplete).toBe(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
test("should support asterisk bullet top-level tasks", () => {
|
test("should support asterisk bullet top-level tasks", () => {
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ type ProgressSection = "todo" | "final-wave" | "other"
|
|||||||
*/
|
*/
|
||||||
export function getPlanProgress(planPath: string): PlanProgress {
|
export function getPlanProgress(planPath: string): PlanProgress {
|
||||||
if (!existsSync(planPath)) {
|
if (!existsSync(planPath)) {
|
||||||
return { total: 0, completed: 0, isComplete: true }
|
return { total: 0, completed: 0, isComplete: false }
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -416,7 +416,7 @@ export function getPlanProgress(planPath: string): PlanProgress {
|
|||||||
// Simple plan: count all top-level checkboxes anywhere
|
// Simple plan: count all top-level checkboxes anywhere
|
||||||
return getSimplePlanProgress(content)
|
return getSimplePlanProgress(content)
|
||||||
} catch {
|
} catch {
|
||||||
return { total: 0, completed: 0, isComplete: true }
|
return { total: 0, completed: 0, isComplete: false }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user