Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
// SPDX-License-Identifier: FSL-1.1-MIT
// Copyright (c) 2026 Cua AI, Inc.
import { describe, expect, it } from "vitest";
import { applyTheme, resolveTheme } from "./theme";
describe("theme", () => {
it("follows the system only when asked to", () => {
expect(resolveTheme("system", true)).toBe("dark");
expect(resolveTheme("system", false)).toBe("light");
expect(resolveTheme("light", true)).toBe("light");
});
it("sets the dark class and color scheme on the root", () => {
const root = document.createElement("html");
applyTheme("dark", root);
expect(root.classList.contains("dark")).toBe(true);
expect(root.style.colorScheme).toBe("dark");
applyTheme("light", root);
expect(root.classList.contains("dark")).toBe(false);
});
});