fix(migrate): count hidden config conflicts in preview (#83314) · openclaw/openclaw@1768667
giodl73-repo
·
2026-05-18
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -81,6 +81,27 @@ describe("formatMigrationPreview", () => {
|
81 | 81 | expect(output).not.toContain("codex-plugins-root"); |
82 | 82 | }); |
83 | 83 | |
| 84 | +it("counts hidden config conflicts in the preview header", () => { |
| 85 | +const output = formatMigrationPreview({ |
| 86 | + ...plan([skillItem(1), { ...configItem(), status: "conflict", sensitive: true }]), |
| 87 | +summary: { |
| 88 | +total: 2, |
| 89 | +planned: 1, |
| 90 | +migrated: 0, |
| 91 | +skipped: 0, |
| 92 | +conflicts: 1, |
| 93 | +errors: 0, |
| 94 | +sensitive: 1, |
| 95 | +}, |
| 96 | +}) |
| 97 | +.map(stripAnsi) |
| 98 | +.join("\n"); |
| 99 | + |
| 100 | +expect(output).toContain("1 item, 1 conflict, 1 sensitive item"); |
| 101 | +expect(output).not.toContain("Config:"); |
| 102 | +expect(output).not.toContain("codex-plugins-root"); |
| 103 | +}); |
| 104 | + |
84 | 105 | it("renders migration warnings with a warning glyph", () => { |
85 | 106 | const output = formatMigrationPreview({ |
86 | 107 | ...plan([skillItem(1)]), |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。