| ... | ... | @@ -3,15 +3,11 @@ import { BUILT_IN_THEMES, getThemeColorsForAppearance } from "@t3tools/shared/th |
| 3 | 3 | |
| 4 | 4 | import { themeColorToNativeColor } from "../../lib/mobileTheme"; |
| 5 | 5 | |
| 6 | | import { |
| 7 | | buildGhosttyThemeConfig, |
| 8 | | getMobileTerminalTheme, |
| 9 | | getPierreTerminalTheme, |
| 10 | | } from "./terminalTheme"; |
| 6 | import { buildGhosttyThemeConfig, getMobileTerminalTheme } from "./terminalTheme"; |
| 11 | 7 | |
| 12 | | describe("getPierreTerminalTheme", () => { |
| 13 | | it("returns the Pierre light terminal palette", () => { |
| 14 | | expect(getPierreTerminalTheme("light")).toMatchObject({ |
| 8 | describe("getMobileTerminalTheme", () => { |
| 9 | it("preserves the default light terminal palette", () => { |
| 10 | expect(getMobileTerminalTheme("t3-code", "light")).toMatchObject({ |
| 15 | 11 | background: "#f2f2f7", |
| 16 | 12 | foreground: "#6C6C71", |
| 17 | 13 | cursorForeground: "#009fff", |
| ... | ... | @@ -19,23 +15,14 @@ describe("getPierreTerminalTheme", () => { |
| 19 | 15 | }); |
| 20 | 16 | }); |
| 21 | 17 | |
| 22 | | it("returns the Pierre dark terminal palette", () => { |
| 23 | | expect(getPierreTerminalTheme("dark")).toMatchObject({ |
| 18 | it("preserves the default dark terminal palette", () => { |
| 19 | expect(getMobileTerminalTheme("t3-code", "dark")).toMatchObject({ |
| 24 | 20 | background: "#0a0a0a", |
| 25 | 21 | foreground: "#adadb1", |
| 26 | 22 | cursorForeground: "#009fff", |
| 27 | 23 | cursorBackground: "#0a0a0a", |
| 28 | 24 | }); |
| 29 | 25 | }); |
| 30 | | }); |
| 31 | | |
| 32 | | describe("getMobileTerminalTheme", () => { |
| 33 | | it("preserves the Pierre terminal for the default theme", () => { |
| 34 | | for (const scheme of ["light", "dark"] as const) { |
| 35 | | expect(getMobileTerminalTheme("t3-code", scheme)).toEqual(getPierreTerminalTheme(scheme)); |
| 36 | | } |
| 37 | | }); |
| 38 | | |
| 39 | 26 | it("applies the selected palette without replacing ANSI status colors", () => { |
| 40 | 27 | const standard = getMobileTerminalTheme("t3-code", "dark"); |
| 41 | 28 | const ocean = getMobileTerminalTheme("ocean", "dark"); |
| ... | ... | @@ -58,7 +45,7 @@ describe("getMobileTerminalTheme", () => { |
| 58 | 45 | |
| 59 | 46 | describe("buildGhosttyThemeConfig", () => { |
| 60 | 47 | it("serializes theme colors into a ghostty config file", () => { |
| 61 | | const config = buildGhosttyThemeConfig(getPierreTerminalTheme("dark")); |
| 48 | const config = buildGhosttyThemeConfig(getMobileTerminalTheme("t3-code", "dark")); |
| 62 | 49 | |
| 63 | 50 | expect(config).toContain("background = #0a0a0a"); |
| 64 | 51 | expect(config).toContain("foreground = #adadb1"); |