Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
import { describe, expect, it } from "vite-plus/test";
import {
BRAND_ASSET_PATHS,
DEVELOPMENT_ICON_OVERRIDES,
DEVELOPMENT_PUBLIC_ICON_OVERRIDES,
resolveWebAssetBrandForChannel,
resolveWebAssetBrandForPackageVersion,
resolveWebIconOverrides,
} from "./brand-assets.ts";
describe("brand-assets", () => {
it("maps production web assets into the server package", () => {
expect(resolveWebIconOverrides("production", "dist/client")).toEqual([
{
sourceRelativePath: BRAND_ASSET_PATHS.productionWebFaviconIco,
targetRelativePath: "dist/client/favicon.ico",
},
{
sourceRelativePath: BRAND_ASSET_PATHS.productionWebFavicon16Png,
targetRelativePath: "dist/client/favicon-16x16.png",
},
{
sourceRelativePath: BRAND_ASSET_PATHS.productionWebFavicon32Png,
targetRelativePath: "dist/client/favicon-32x32.png",
},
{
sourceRelativePath: BRAND_ASSET_PATHS.productionWebAppleTouchIconPng,
targetRelativePath: "dist/client/apple-touch-icon.png",
},
]);
});
it("maps server build web assets to development icons", () => {
expect(DEVELOPMENT_ICON_OVERRIDES[0]).toEqual({
sourceRelativePath: BRAND_ASSET_PATHS.productionWebFaviconIco,
targetRelativePath: "dist/client/favicon.ico",
});
});
it("maps development web assets to the public splash and favicon files", () => {
expect(DEVELOPMENT_PUBLIC_ICON_OVERRIDES).toEqual([
{
sourceRelativePath: BRAND_ASSET_PATHS.productionWebFaviconIco,
targetRelativePath: "apps/web/public/favicon.ico",
},
{
sourceRelativePath: BRAND_ASSET_PATHS.productionWebFavicon16Png,
targetRelativePath: "apps/web/public/favicon-16x16.png",
},
{
sourceRelativePath: BRAND_ASSET_PATHS.productionWebFavicon32Png,
targetRelativePath: "apps/web/public/favicon-32x32.png",
},
{
sourceRelativePath: BRAND_ASSET_PATHS.productionWebAppleTouchIconPng,
targetRelativePath: "apps/web/public/apple-touch-icon.png",
},
]);
});
it("can target hosted web dist directly", () => {
expect(resolveWebIconOverrides("production", "apps/web/dist")).toContainEqual({
sourceRelativePath: BRAND_ASSET_PATHS.productionWebAppleTouchIconPng,
targetRelativePath: "apps/web/dist/apple-touch-icon.png",
});
});
it("maps the hosted release channel to production web assets", () => {
expect(resolveWebAssetBrandForChannel("latest")).toBe("production");
});
it("uses production web assets for packaged versions", () => {
expect(resolveWebAssetBrandForPackageVersion("0.0.29")).toBe("production");
});
it("uses the Akeru favicon artwork for production desktop and web icons", () => {
expect(BRAND_ASSET_PATHS.productionMacIconPng).toBe("assets/prod/akeru-macos-1024.png");
expect(BRAND_ASSET_PATHS.productionLinuxIconPng).toBe("apps/marketing/public/icon.png");
expect(BRAND_ASSET_PATHS.productionWindowsIconIco).toBe("apps/web/public/favicon.ico");
});
});