|
2 | 2 | import { describe, expect, expectTypeOf, it } from "vitest"; |
3 | 3 | import type { OpenClawConfig } from "../config/types.openclaw.js"; |
4 | 4 | import { runDoctorHealthRepairs } from "./doctor-repair-flow.js"; |
5 | | -import { defineSplitHealthCheck, normalizeHealthCheck } from "./health-check-adapter.js"; |
| 5 | +import { normalizeHealthCheck } from "./health-check-adapter.js"; |
6 | 6 | import type { RunnableHealthCheck, SplitHealthCheckInput } from "./health-check-runner-types.js"; |
7 | 7 | import type { HealthCheck, HealthRepairContext } from "./health-checks.js"; |
8 | 8 |
|
@@ -68,7 +68,7 @@ describe("runDoctorHealthRepairs", () => { |
68 | 68 | it("repairs modern checks and threads updated config", async () => { |
69 | 69 | const scopes: unknown[] = []; |
70 | 70 | const checks: HealthCheck[] = [ |
71 | | - defineSplitHealthCheck({ |
| 71 | + normalizeHealthCheck({ |
72 | 72 | id: "test/repairable", |
73 | 73 | kind: "core", |
74 | 74 | description: "repairable", |
@@ -116,7 +116,7 @@ describe("runDoctorHealthRepairs", () => { |
116 | 116 |
|
117 | 117 | it("leaves non-repairable checks for legacy doctor behavior", async () => { |
118 | 118 | const checks: HealthCheck[] = [ |
119 | | - defineSplitHealthCheck({ |
| 119 | + normalizeHealthCheck({ |
120 | 120 | id: "test/legacy-only", |
121 | 121 | kind: "core", |
122 | 122 | description: "legacy only", |
@@ -144,7 +144,7 @@ describe("runDoctorHealthRepairs", () => { |
144 | 144 |
|
145 | 145 | it("keeps split check findings when repair throws", async () => { |
146 | 146 | const checks: HealthCheck[] = [ |
147 | | - defineSplitHealthCheck({ |
| 147 | + normalizeHealthCheck({ |
148 | 148 | id: "test/repair-throws", |
149 | 149 | kind: "core", |
150 | 150 | description: "repair throws", |
@@ -179,7 +179,7 @@ describe("runDoctorHealthRepairs", () => { |
179 | 179 |
|
180 | 180 | it("reports repair validation findings that remain after repair", async () => { |
181 | 181 | const checks: HealthCheck[] = [ |
182 | | - defineSplitHealthCheck({ |
| 182 | + normalizeHealthCheck({ |
183 | 183 | id: "test/not-fixed", |
184 | 184 | kind: "core", |
185 | 185 | description: "not fixed", |
@@ -217,7 +217,7 @@ describe("runDoctorHealthRepairs", () => { |
217 | 217 | it("validates successful repairs by default", async () => { |
218 | 218 | let detectCalls = 0; |
219 | 219 | const checks: HealthCheck[] = [ |
220 | | - defineSplitHealthCheck({ |
| 220 | + normalizeHealthCheck({ |
221 | 221 | id: "test/no-default-validation", |
222 | 222 | kind: "core", |
223 | 223 | description: "no default validation", |
@@ -256,7 +256,7 @@ describe("runDoctorHealthRepairs", () => { |
256 | 256 | it("does not validate skipped or failed repair results", async () => { |
257 | 257 | let validationCalls = 0; |
258 | 258 | const checks: HealthCheck[] = [ |
259 | | - defineSplitHealthCheck({ |
| 259 | + normalizeHealthCheck({ |
260 | 260 | id: "test/skipped", |
261 | 261 | kind: "core", |
262 | 262 | description: "skipped", |
@@ -294,7 +294,7 @@ describe("runDoctorHealthRepairs", () => { |
294 | 294 | const repairContexts: HealthRepairContext[] = []; |
295 | 295 | let detectCalls = 0; |
296 | 296 | const checks: HealthCheck[] = [ |
297 | | - defineSplitHealthCheck({ |
| 297 | + normalizeHealthCheck({ |
298 | 298 | id: "test/dry-run", |
299 | 299 | kind: "core", |
300 | 300 | description: "dry run", |
@@ -356,7 +356,7 @@ describe("runDoctorHealthRepairs", () => { |
356 | 356 | it("passes diff false and true through the repair API", async () => { |
357 | 357 | const repairContexts: HealthRepairContext[] = []; |
358 | 358 | const checks: HealthCheck[] = [ |
359 | | - defineSplitHealthCheck({ |
| 359 | + normalizeHealthCheck({ |
360 | 360 | id: "test/diff-preview", |
361 | 361 | kind: "core", |
362 | 362 | description: "diff preview", |
|
0 commit comments