| 10 | // A fake `UserAppearanceSettings` shape. We avoid importing the real |
| 11 | // type to keep these tests independent of codegen ordering. |
| 12 | const settings = (overrides: Record<string, string | undefined> = {}) => ({ |
| 13 | theme_preference: overrides.theme_preference ?? "", |
| 14 | theme_mode: overrides.theme_mode ?? "", |
| 15 | theme_light: overrides.theme_light ?? "", |
| 16 | theme_dark: overrides.theme_dark ?? "", |
| 17 | terminal_font: overrides.terminal_font ?? "", |
| 18 | }); |
| 19 | |
| 20 | describe("migrateLegacyPreference", () => { |
| 21 | it("prefers the new fields when theme_mode=sync is set", () => { |