Open History to see the last commit
1import { describe, expect, it } from "vitest";
2
3import {
4 BRAND_ASSET_PATHS,
5 DEVELOPMENT_ICON_OVERRIDES,
6 PUBLISH_ICON_OVERRIDES,
7 resolveWebIconOverrides,
8} from "./brand-assets.ts";
9
10describe("brand-assets", () => {
11 it("maps server publish web assets to production icons", () => {
12 expect(PUBLISH_ICON_OVERRIDES).toEqual([
13 {
14 sourceRelativePath: BRAND_ASSET_PATHS.productionWebFaviconIco,
15 targetRelativePath: "dist/client/favicon.ico",
16 },
17 {
18 sourceRelativePath: BRAND_ASSET_PATHS.productionWebFavicon16Png,
19 targetRelativePath: "dist/client/favicon-16x16.png",
20 },
21 {
22 sourceRelativePath: BRAND_ASSET_PATHS.productionWebFavicon32Png,
23 targetRelativePath: "dist/client/favicon-32x32.png",
24 },
25 {
26 sourceRelativePath: BRAND_ASSET_PATHS.productionWebAppleTouchIconPng,
27 targetRelativePath: "dist/client/apple-touch-icon.png",
28 },
29 ]);
30 });
31
32 it("maps server build web assets to development icons", () => {
33 expect(DEVELOPMENT_ICON_OVERRIDES[0]).toEqual({
34 sourceRelativePath: BRAND_ASSET_PATHS.developmentWebFaviconIco,
35 targetRelativePath: "dist/client/favicon.ico",
36 });
37 });
38
39 it("can target hosted web dist directly", () => {
40 expect(resolveWebIconOverrides("production", "apps/web/dist")).toContainEqual({
41 sourceRelativePath: BRAND_ASSET_PATHS.productionWebAppleTouchIconPng,
42 targetRelativePath: "apps/web/dist/apple-touch-icon.png",
43 });
44 });
45});