test: tighten custom theme parse assertion · openclaw/openclaw@6d1c5c9
shakkernerd
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -299,7 +299,11 @@ describe("custom theme import helpers", () => {
|
299 | 299 | it("parses stored imported themes and rejects malformed records", () => { |
300 | 300 | const imported = createImportedTheme(); |
301 | 301 | |
302 | | -expect(parseImportedCustomTheme(imported)?.themeId).toBe("cmlhfpjhw000004l4f4ax3m7z"); |
| 302 | +const parsed = parseImportedCustomTheme(imported); |
| 303 | +if (!parsed) { |
| 304 | +throw new Error("Expected imported custom theme to parse"); |
| 305 | +} |
| 306 | +expect(parsed.themeId).toBe("cmlhfpjhw000004l4f4ax3m7z"); |
303 | 307 | expect(parseImportedCustomTheme({ ...imported, light: {} })).toBeNull(); |
304 | 308 | }); |
305 | 309 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。