The best way to control Claude Code, Codex and more from any computer or phone

main
ts 22 lines 893 Bytes
Raw
1 import { describe, expect, it } from "vite-plus/test";
2
3 import { resolveAppearancePreferences, resolveComposerTextRole } from "./appearancePreferences";
4
5 describe("appearancePreferences", () => {
6 it("migrates the legacy markdownFontSize key to baseFontSize", () => {
7 expect(resolveAppearancePreferences({ markdownFontSize: 18 }).baseFontSize).toBe(18);
8 expect(
9 resolveAppearancePreferences({ baseFontSize: 16, markdownFontSize: 18 }).baseFontSize,
10 ).toBe(16);
11 });
12
13 it("scales the iOS composer text with the system text size", () => {
14 const body = { fontSize: 16, lineHeight: 23 };
15 expect(resolveComposerTextRole(body, 1, "ios")).toEqual(body);
16 expect(resolveComposerTextRole(body, 2.643, "ios")).toEqual({
17 fontSize: 16 * 2.643,
18 lineHeight: 23 * 2.643,
19 });
20 expect(resolveComposerTextRole(body, 2.643, "android")).toEqual(body);
21 });
22 });