fix: readable terminal selection with the light theme (#1319)

This commit is contained in:
LukeGus committed 2026-09-30 11:58:35 -05:00
1 parent e88df7827b
commit d30875483d
2 files changed
+25 -1

No files matched your search

@@ -0,0 +1,21 @@
import { describe, expect, it } from "vitest";
import { resolveTermixThemeColors } from "../../../src/frontend/look/terminal-theme";
import { TERMINAL_THEMES } from "../../../src/frontend/look/terminal-themes";
describe("resolveTermixThemeColors", () => {
it("uses the light selection color with the light UI theme", () => {
const colors = resolveTermixThemeColors("termix", "light");
expect(colors.background).toBe("#ffffff");
expect(colors.selectionBackground).toBe(
TERMINAL_THEMES.termixLight.colors.selectionBackground,
);
});
it("keeps the dark selection color with dark UI themes", () => {
const colors = resolveTermixThemeColors("termix", "dracula");
expect(colors.background).toBe("#282a36");
expect(colors.selectionBackground).toBe(
TERMINAL_THEMES.termixDark.colors.selectionBackground,
);
});
});