Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

923 B
Raw Blame
import { describe, expect, it } from "vitest";
import { layoutVariables, shellLayout } from "./layout";

describe("three-level presentation configuration", () => {
  it("inherits each shell profile and applies only its own overrides", () => {
    expect(shellLayout("ios")).toMatchObject({ "--ui-control-height": "2.75rem" });
    expect(shellLayout("android")).toMatchObject({ "--ui-control-height": "3rem" });
    const config = { windows: { pagePadding: 32, sidebarWidth: 288 } };
    expect(shellLayout("windows", config)).toMatchObject({ "--feature-padding": "2rem", "--feature-sidebar-width": "18rem" });
    expect(shellLayout("macos", config)).toEqual(shellLayout("macos"));
  });
  it("allows feature overrides without accepting invalid CSS dimensions", () => {
    expect(layoutVariables({ gap: 24, controlHeight: NaN, pagePadding: -3, sidebarWidth: Infinity })).toEqual({ "--feature-gap": "1.5rem" });
  });
});