@devries-cameron20 / t3code-1 / commits / 3117be980b
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

test(runtime): prune duplicate cases and unused test-only exports (#21851)

Co-authored-by: Theo Browne <me@t3.gg>

Julius Marminge committed Oct 19, 2026 at 20:45 UTC 3117be980bebd268b9cc6dc8b8609547f7ae3a15
17 files changed +27 -400
apps/server/src/persistence/Errors.test.ts
+1 -14
@@ -4,7 +4,7 @@ import * as Effect from "effect/Effect";
4 import * as Schema from "effect/Schema";
5 import * as SqlClient from "effect/sql/SqlClient";
6
7 -import { PersistenceDecodeError, PersistenceSqlError, toPersistenceSqlError } from "./Errors.ts";
7 +import { PersistenceDecodeError, toPersistenceSqlError } from "./Errors.ts";
8
9 const decodeRuntimePayload = Schema.decodeUnknownEffect(
10 Schema.Struct({
@@ -14,19 +14,6 @@ const decodeRuntimePayload = Schema.decodeUnknownEffect(
14 }),
15 );
16
17 -it("keeps SQL operation context without a tautological detail", () => {
18 - const cause = new Error("database unavailable");
19 - const error = new PersistenceSqlError({
20 - operation: "AuthSessionRepository.list:query",
21 - cause,
22 - });
23 -
24 - assert.equal(error.operation, "AuthSessionRepository.list:query");
25 - assert.equal(error.detail, undefined);
26 - assert.equal(error.cause, cause);
27 - assert.equal(error.message, "SQL error in AuthSessionRepository.list:query");
28 -});
29 -
17 it.effect("names a real SQLite condition without copying query data", () =>
18 Effect.gen(function* () {
19 const sql = yield* SqlClient.SqlClient;
packages/contracts/src/keybindings.test.ts
-132
@@ -22,138 +22,6 @@ const decode = <S extends Schema.Top>(
22 const decodeResolvedRule = Schema.decodeUnknownEffect(ResolvedKeybindingRule as never);
23 const encodeResolvedKeybindings = Schema.encodeEffect(ResolvedKeybindingsConfig);
24
25 -it.effect("parses keybinding rules", () =>
26 - Effect.gen(function* () {
27 - const parsed = yield* decode(KeybindingRule, {
28 - key: "mod+j",
29 - command: "terminal.toggle",
30 - });
31 - assert.strictEqual(parsed.command, "terminal.toggle");
32 -
33 - const parsedSidebarToggle = yield* decode(KeybindingRule, {
34 - key: "mod+b",
35 - command: "sidebar.toggle",
36 - });
37 - assert.strictEqual(parsedSidebarToggle.command, "sidebar.toggle");
38 -
39 - const parsedRightPanelToggle = yield* decode(KeybindingRule, {
40 - key: "mod+alt+b",
41 - command: "rightPanel.toggle",
42 - });
43 - assert.strictEqual(parsedRightPanelToggle.command, "rightPanel.toggle");
44 -
45 - const parsedThreadPanelToggle = yield* decode(KeybindingRule, {
46 - key: "mod+shift+b",
47 - command: "threadPanel.toggle",
48 - });
49 - assert.strictEqual(parsedThreadPanelToggle.command, "threadPanel.toggle");
50 - const parsedRightPanelToggleMaximized = yield* decode(KeybindingRule, {
51 - key: "mod+shift+m",
52 - command: "rightPanel.toggleMaximized",
53 - });
54 - assert.strictEqual(parsedRightPanelToggleMaximized.command, "rightPanel.toggleMaximized");
55 -
56 - const parsedClose = yield* decode(KeybindingRule, {
57 - key: "mod+w",
58 - command: "terminal.close",
59 - });
60 - assert.strictEqual(parsedClose.command, "terminal.close");
61 -
62 - const parsedDiffToggle = yield* decode(KeybindingRule, {
63 - key: "mod+d",
64 - command: "diff.toggle",
65 - });
66 - assert.strictEqual(parsedDiffToggle.command, "diff.toggle");
67 -
68 - const parsedCommandPalette = yield* decode(KeybindingRule, {
69 - key: "mod+k",
70 - command: "commandPalette.toggle",
71 - });
72 - assert.strictEqual(parsedCommandPalette.command, "commandPalette.toggle");
73 -
74 - const parsedFilePicker = yield* decode(KeybindingRule, {
75 - key: "mod+p",
76 - command: "filePicker.toggle",
77 - });
78 - assert.strictEqual(parsedFilePicker.command, "filePicker.toggle");
79 -
80 - const parsedProjectSearch = yield* decode(KeybindingRule, {
81 - key: "mod+shift+f",
82 - command: "projectSearch.toggle",
83 - });
84 - assert.strictEqual(parsedProjectSearch.command, "projectSearch.toggle");
85 -
86 - const parsedUsageOpen = yield* decode(KeybindingRule, {
87 - key: "mod+u",
88 - command: "usage.open",
89 - });
90 - assert.strictEqual(parsedUsageOpen.command, "usage.open");
91 -
92 - const parsedThemeEditor = yield* decode(KeybindingRule, {
93 - key: "mod+alt+shift+t",
94 - command: "themeEditor.toggle",
95 - });
96 - assert.strictEqual(parsedThemeEditor.command, "themeEditor.toggle");
97 -
98 - const parsedLocal = yield* decode(KeybindingRule, {
99 - key: "mod+shift+n",
100 - command: "chat.newLocal",
101 - });
102 - assert.strictEqual(parsedLocal.command, "chat.newLocal");
103 -
104 - const parsedFind = yield* decode(KeybindingRule, {
105 - key: "mod+f",
106 - command: "chat.find",
107 - });
108 - assert.strictEqual(parsedFind.command, "chat.find");
109 -
110 - const parsedModelPickerToggle = yield* decode(KeybindingRule, {
111 - key: "mod+shift+m",
112 - command: "modelPicker.toggle",
113 - });
114 - assert.strictEqual(parsedModelPickerToggle.command, "modelPicker.toggle");
115 -
116 - const parsedModelPickerJump = yield* decode(KeybindingRule, {
117 - key: "mod+1",
118 - command: "modelPicker.jump.1",
119 - });
120 - assert.strictEqual(parsedModelPickerJump.command, "modelPicker.jump.1");
121 -
122 - const parsedThreadPrevious = yield* decode(KeybindingRule, {
123 - key: "mod+shift+[",
124 - command: "thread.previous",
125 - });
126 - assert.strictEqual(parsedThreadPrevious.command, "thread.previous");
127 -
128 - const parsedThreadSettle = yield* decode(KeybindingRule, {
129 - key: "mod+shift+s",
130 - command: "thread.settle",
131 - when: "!terminalFocus",
132 - });
133 - assert.strictEqual(parsedThreadSettle.command, "thread.settle");
134 -
135 - const parsedThreadCopyReference = yield* decode(KeybindingRule, {
136 - key: "mod+shift+c",
137 - command: "thread.copyReference",
138 - when: "!terminalFocus",
139 - });
140 - assert.strictEqual(parsedThreadCopyReference.command, "thread.copyReference");
141 -
142 - const parsedPullRequestCopyNumber = yield* decode(KeybindingRule, {
143 - key: "mod+shift+k",
144 - command: "pullRequest.copyNumber",
145 - when: "!terminalFocus",
146 - });
147 - assert.strictEqual(parsedPullRequestCopyNumber.command, "pullRequest.copyNumber");
148 -
149 - const parsedThreadStop = yield* decode(KeybindingRule, {
150 - key: "mod+escape",
151 - command: "thread.stop",
152 - });
153 - assert.strictEqual(parsedThreadStop.command, "thread.stop");
154 - }),
155 -);
156 -
25 it.effect("rejects invalid command values", () =>
26 Effect.gen(function* () {
27 const result = yield* Effect.exit(
packages/contracts/src/rpc.test.ts
-6
@@ -6,12 +6,6 @@ import { ORCHESTRATION_V2_WS_METHODS } from "./orchestrationV2.ts";
6 import { WS_METHODS, WsRpcGroup, WsSubscribeServerConfigRpc } from "./rpc.ts";
7
8 describe("subscribeServerConfig payload compatibility", () => {
9 - it("is accepted by a server whose schema predates the field", () => {
10 - const oldServerPayload = Schema.Struct({});
11 - const decoded = Schema.decodeExit(oldServerPayload)({ environmentThemes: true });
12 - expect(Exit.isSuccess(decoded)).toBe(true);
13 - });
14 -
9 it("is carried by a server that declares it", () => {
10 const decoded = Schema.decodeSync(WsSubscribeServerConfigRpc.payloadSchema)({
11 environmentThemes: true,
packages/contracts/src/settings.test.ts
+2 -2
@@ -598,7 +598,7 @@ describe("ClientSettings glass opacity", () => {
598 expect(() => decodeClientSettingsPatch({ glassOpacity: value })).toThrow();
599 });
600
601 - it.each([40, 75, 100])("accepts a glass opacity within the supported range: %s", (value) => {
601 + it.each([40, 100])("accepts a glass opacity within the supported range: %s", (value) => {
602 expect(decodeClientSettings({ glassOpacity: value }).glassOpacity).toBe(value);
603 expect(decodeClientSettingsPatch({ glassOpacity: value }).glassOpacity).toBe(value);
604 });
@@ -614,7 +614,7 @@ describe("ClientSettings appearance contrast", () => {
614 expect(() => decodeClientSettingsPatch({ appearanceContrast: value })).toThrow();
615 });
616
617 - it.each([50, 100, 150, 200])("accepts an appearance contrast in range: %s", (value) => {
617 + it.each([50, 200])("accepts an appearance contrast in range: %s", (value) => {
618 expect(decodeClientSettings({ appearanceContrast: value }).appearanceContrast).toBe(value);
619 expect(decodeClientSettingsPatch({ appearanceContrast: value }).appearanceContrast).toBe(value);
620 });
packages/shared/src/cliArgs.test.ts
-42
@@ -66,20 +66,6 @@ describe("parseCliArgs", () => {
66 });
67 });
68
69 - it("parses --chrome with --verbose", () => {
70 - expect(parseCliArgs("--chrome --verbose")).toEqual({
71 - flags: { chrome: null, verbose: null },
72 - positionals: [],
73 - });
74 - });
75 -
76 - it("parses --effort with a value", () => {
77 - expect(parseCliArgs("--effort high")).toEqual({
78 - flags: { effort: "high" },
79 - positionals: [],
80 - });
81 - });
82 -
69 it("parses --chrome --effort high --debug", () => {
70 expect(parseCliArgs("--chrome --effort high --debug")).toEqual({
71 flags: { chrome: null, effort: "high", debug: null },
@@ -87,20 +73,6 @@ describe("parseCliArgs", () => {
73 });
74 });
75
90 - it("parses --model with full model name", () => {
91 - expect(parseCliArgs("--model claude-sonnet-4-6")).toEqual({
92 - flags: { model: "claude-sonnet-4-6" },
93 - positionals: [],
94 - });
95 - });
96 -
97 - it("parses --append-system-prompt with value and --chrome", () => {
98 - expect(parseCliArgs("--append-system-prompt always-think-step-by-step --chrome")).toEqual({
99 - flags: { "append-system-prompt": "always-think-step-by-step", chrome: null },
100 - positionals: [],
101 - });
102 - });
103 -
76 it("parses quoted --append-system-prompt with value and --chrome", () => {
77 expect(parseCliArgs(`--append-system-prompt "always think step by step" --chrome`)).toEqual({
78 flags: { "append-system-prompt": "always think step by step", chrome: null },
@@ -108,20 +80,6 @@ describe("parseCliArgs", () => {
80 });
81 });
82
111 - it("parses --max-budget-usd with numeric value", () => {
112 - expect(parseCliArgs("--chrome --max-budget-usd 5.00")).toEqual({
113 - flags: { chrome: null, "max-budget-usd": "5.00" },
114 - positionals: [],
115 - });
116 - });
117 -
118 - it("parses --effort=high syntax", () => {
119 - expect(parseCliArgs("--effort=high")).toEqual({
120 - flags: { effort: "high" },
121 - positionals: [],
122 - });
123 - });
124 -
83 it("parses --key=value mixed with boolean flags", () => {
84 expect(parseCliArgs("--chrome --model=claude-sonnet-4-6 --debug")).toEqual({
85 flags: { chrome: null, model: "claude-sonnet-4-6", debug: null },
packages/shared/src/composerInlineTokens.test.ts
+12 -15
@@ -31,22 +31,19 @@ describe("collectComposerInlineTokens", () => {
31 ]);
32 });
33
34 - it.each(["$", "€", "£", "¥", "₹", "₩", "₿", "𑿝"])(
35 - "collects %s skill names that begin with a digit",
36 - (prefix) => {
37 - expect(collectComposerInlineTokens(`Use ${prefix}2spec next`)).toEqual([
38 - {
39 - type: "skill",
40 - value: "2spec",
41 - source: `${prefix}2spec`,
42 - start: 4,
43 - end: 9 + prefix.length,
44 - },
45 - ]);
46 - },
47 - );
34 + it.each(["$", "€", "𑿝"])("collects %s skill names that begin with a digit", (prefix) => {
35 + expect(collectComposerInlineTokens(`Use ${prefix}2spec next`)).toEqual([
36 + {
37 + type: "skill",
38 + value: "2spec",
39 + source: `${prefix}2spec`,
40 + start: 4,
41 + end: 9 + prefix.length,
42 + },
43 + ]);
44 + });
45
49 - it.each(["€", "£", "¥", "₹", "₩", "₿", "𑿝"])("leaves %s currency amounts as text", (prefix) => {
46 + it.each(["€", "𑿝"])("leaves %s currency amounts as text", (prefix) => {
47 expect(
48 collectComposerInlineTokens(
49 `${prefix}20 ${prefix}1_000 ${prefix}20k ${prefix}100M ${prefix}1e6 `,
packages/shared/src/composerTrigger.test.ts
+9 -12
@@ -43,18 +43,15 @@ describe("detectComposerTrigger", () => {
43 (text) => expect(detectComposerTrigger(text, text.length)).toBeNull(),
44 );
45
46 - it.each(["$", "€", "£", "¥", "₹", "₩", "₿", "𑿝"])(
47 - "detects %s skill prefixes and their source range",
48 - (prefix) => {
49 - const text = `Use ${prefix}review`;
50 - expect(detectComposerTrigger(text, text.length)).toEqual({
51 - kind: "skill",
52 - query: "review",
53 - rangeStart: 4,
54 - rangeEnd: text.length,
55 - });
56 - },
57 - );
46 + it.each(["$", "€", "𑿝"])("detects %s skill prefixes and their source range", (prefix) => {
47 + const text = `Use ${prefix}review`;
48 + expect(detectComposerTrigger(text, text.length)).toEqual({
49 + kind: "skill",
50 + query: "review",
51 + rangeStart: 4,
52 + rangeEnd: text.length,
53 + });
54 + });
55 });
56
57 describe("serializeComposerFileLink", () => {
packages/shared/src/image.test.ts
-16
@@ -29,26 +29,10 @@ describe("imageMimeType", () => {
29 });
30 });
31
32 -describe("legacy attachments", () => {
33 - it("recognizes a picture that was sent before pictures were typed by content", () => {
34 - expect(imageMimeType({ name: "IMG_4996.PNG", mimeType: "application/octet-stream" })).toBe(
35 - "image/png",
36 - );
37 - expect(imageMimeType({ name: "1000000020.png", mimeType: "" })).toBe("image/png");
38 - });
39 -});
40 -
32 describe("a declared non-image type", () => {
33 it("wins over a misleading picture extension", () => {
34 expect(imageMimeType({ name: "report.png", mimeType: "application/pdf" })).toBeNull();
35 expect(imageMimeType({ name: "archive.jpg", mimeType: "application/zip" })).toBeNull();
36 expect(imageMimeType({ name: "clip.png", mimeType: "video/mp4" })).toBeNull();
37 });
47 -
48 - it("still falls back when the type is absent or generic", () => {
49 - expect(imageMimeType({ name: "IMG_4996.PNG", mimeType: "application/octet-stream" })).toBe(
50 - "image/png",
51 - );
52 - expect(imageMimeType({ name: "1000000020.png", mimeType: "" })).toBe("image/png");
53 - });
38 });
packages/shared/src/model.test.ts
-16
@@ -164,22 +164,6 @@ describe("descriptor helpers", () => {
164 ).toEqual([{ id: "fastMode", value: true }]);
165 });
166
167 - it("stores option selection arrays in model selections", () => {
168 - expect(
169 - createModelSelection(ProviderInstanceId.make("codex"), "gpt-5.4", [
170 - { id: "reasoningEffort", value: "high" },
171 - { id: "fastMode", value: true },
172 - ]),
173 - ).toEqual({
174 - instanceId: "codex",
175 - model: "gpt-5.4",
176 - options: [
177 - { id: "reasoningEffort", value: "high" },
178 - { id: "fastMode", value: true },
179 - ],
180 - });
181 - });
182 -
167 it("reads typed option selection values", () => {
168 const selection = createModelSelection(ProviderInstanceId.make("codex"), "gpt-5.4", [
169 { id: "reasoningEffort", value: "high" },
packages/shared/src/previewViewport.test.ts
+1 -23
@@ -1,6 +1,6 @@
1 import { describe, expect, it } from "vite-plus/test";
2
3 -import { PREVIEW_VIEWPORT_PRESETS, resolvePreviewViewport } from "./previewViewport.ts";
3 +import { resolvePreviewViewport } from "./previewViewport.ts";
4
5 describe("previewViewport", () => {
6 it("resolves fill and exact freeform viewports", () => {
@@ -32,26 +32,4 @@ describe("previewViewport", () => {
32 presetId: "iphone-12-pro",
33 });
34 });
35 -
36 - it("matches Chrome's standard device catalog ordering", () => {
37 - expect(PREVIEW_VIEWPORT_PRESETS.map((preset) => preset.label)).toEqual([
38 - "iPhone SE",
39 - "iPhone XR",
40 - "iPhone 12 Pro",
41 - "iPhone 14 Pro Max",
42 - "Pixel 7",
43 - "Samsung Galaxy S8+",
44 - "Samsung Galaxy S20 Ultra",
45 - "iPad Mini",
46 - "iPad Air",
47 - "iPad Pro",
48 - "Surface Pro 7",
49 - "Surface Duo",
50 - "Galaxy Z Fold 5",
51 - "Asus Zenbook Fold",
52 - "Samsung Galaxy A51/71",
53 - "Nest Hub",
54 - "Nest Hub Max",
55 - ]);
56 - });
35 });
packages/shared/src/terminalLabels.test.ts
-4
@@ -43,10 +43,6 @@ describe("nextTerminalId", () => {
43 expect(nextTerminalId([])).toBe(DEFAULT_TERMINAL_ID);
44 });
45
46 - it("allocates term-2 when only term-1 exists", () => {
47 - expect(nextTerminalId([DEFAULT_TERMINAL_ID])).toBe("term-2");
48 - });
49 -
46 it("skips over taken term-N slots", () => {
47 expect(nextTerminalId([DEFAULT_TERMINAL_ID, "term-2", "term-3"])).toBe("term-4");
48 expect(nextTerminalId([DEFAULT_TERMINAL_ID, "term-3"])).toBe("term-2");
scripts/build-desktop-artifact.test.ts
-11
@@ -749,17 +749,6 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
749 }).pipe(Effect.provide(ConfigProvider.layer(ConfigProvider.fromEnv({ env: {} })))),
750 );
751
752 - it("excludes foreign node-pty prebuilds from macOS and Linux packages", () => {
753 - assert.deepStrictEqual(MAC_FILE_EXCLUSIONS, [
754 - "!**/node_modules/node-pty/prebuilds/win32-*/**/*",
755 - "!**/node_modules/node-pty/third_party/conpty/**/*",
756 - ]);
757 - assert.deepStrictEqual(LINUX_FILE_EXCLUSIONS, [
758 - ...MAC_FILE_EXCLUSIONS,
759 - "!**/node_modules/node-pty/prebuilds/darwin-*/**/*",
760 - ]);
761 - });
762 -
752 it("unpacks native binaries while keeping their JavaScript and metadata archived", () => {
753 for (const file of [
754 "node_modules/@napi-rs/keyring/keyring.win32-x64-msvc.node",
scripts/dev-runner.test.ts
-27
@@ -20,7 +20,6 @@ import {
20 createDevRunnerEnv,
21 devPortProbeHosts,
22 findFirstAvailableOffset,
23 - getDevRunnerModeArgs,
23 isBrowserAllowedPort,
24 resolveModePortOffsets,
25 resolveOffset,
@@ -84,32 +83,6 @@ it.layer(NodeServices.layer)("dev-runner", (it) => {
83 }),
84 );
85
87 - describe("getDevRunnerModeArgs", () => {
88 - it.effect("lets Vite+ honor the desktop dev task graph", () =>
89 - Effect.sync(() => {
90 - assert.deepStrictEqual(getDevRunnerModeArgs("dev:desktop"), [
91 - "run",
92 - "--filter=@t3tools/desktop",
93 - "--filter=@t3tools/web",
94 - "dev",
95 - ]);
96 - }),
97 - );
98 -
99 - it.effect("places Vite+ run flags before the task name", () =>
100 - Effect.sync(() => {
101 - assert.deepStrictEqual(getDevRunnerModeArgs("dev"), [
102 - "run",
103 - "--filter=@t3tools/contracts",
104 - "--filter=@t3tools/web",
105 - "--filter=t3",
106 - "--parallel",
107 - "dev",
108 - ]);
109 - }),
110 - );
111 - });
112 -
86 describe("resolveOffset", () => {
87 it.effect("uses explicit T3CODE_PORT_OFFSET when provided", () =>
88 Effect.gen(function* () {
scripts/dev-runner.ts
-4
@@ -92,10 +92,6 @@ type PortAvailabilityCheck<R = never> = (
92
93 const DEV_RUNNER_MODES = Object.keys(MODE_ARGS) as Array<DevMode>;
94
95 -export function getDevRunnerModeArgs(mode: DevMode): ReadonlyArray<string> {
96 - return MODE_ARGS[mode];
97 -}
98 -
95 export function isBrowserAllowedPort(port: number): boolean {
96 return !FETCH_BAD_PORTS.has(port);
97 }
scripts/lib/brand-assets.test.ts
-45
@@ -2,8 +2,6 @@ import { describe, expect, it } from "vite-plus/test";
2
3 import {
4 BRAND_ASSET_PATHS,
5 - DEVELOPMENT_ICON_OVERRIDES,
6 - DEVELOPMENT_PUBLIC_ICON_OVERRIDES,
5 resolveWebAssetBrandForChannel,
6 resolveWebAssetBrandForPackageVersion,
7 resolveWebIconOverrides,
@@ -31,34 +29,6 @@ describe("brand-assets", () => {
29 ]);
30 });
31
34 - it("maps server build web assets to development icons", () => {
35 - expect(DEVELOPMENT_ICON_OVERRIDES[0]).toEqual({
36 - sourceRelativePath: BRAND_ASSET_PATHS.developmentWebFaviconIco,
37 - targetRelativePath: "dist/client/favicon.ico",
38 - });
39 - });
40 -
41 - it("maps development web assets to the public splash and favicon files", () => {
42 - expect(DEVELOPMENT_PUBLIC_ICON_OVERRIDES).toEqual([
43 - {
44 - sourceRelativePath: BRAND_ASSET_PATHS.developmentWebFaviconIco,
45 - targetRelativePath: "apps/web/public/favicon.ico",
46 - },
47 - {
48 - sourceRelativePath: BRAND_ASSET_PATHS.developmentWebFavicon16Png,
49 - targetRelativePath: "apps/web/public/favicon-16x16.png",
50 - },
51 - {
52 - sourceRelativePath: BRAND_ASSET_PATHS.developmentWebFavicon32Png,
53 - targetRelativePath: "apps/web/public/favicon-32x32.png",
54 - },
55 - {
56 - sourceRelativePath: BRAND_ASSET_PATHS.developmentWebAppleTouchIconPng,
57 - targetRelativePath: "apps/web/public/apple-touch-icon.png",
58 - },
59 - ]);
60 - });
61 -
32 it("can target hosted web dist directly", () => {
33 expect(resolveWebIconOverrides("production", "apps/web/dist")).toContainEqual({
34 sourceRelativePath: BRAND_ASSET_PATHS.productionWebAppleTouchIconPng,
@@ -83,19 +53,4 @@ describe("brand-assets", () => {
53 expect(resolveWebAssetBrandForPackageVersion("0.0.29-nightly.20260723.882")).toBe("nightly");
54 expect(resolveWebAssetBrandForPackageVersion("0.0.29-preview.20260723.882")).toBe("nightly");
55 });
86 -
87 - it("keeps development, nightly, and production icon families separate", () => {
88 - expect([
89 - BRAND_ASSET_PATHS.developmentIconComposerProject,
90 - BRAND_ASSET_PATHS.nightlyIconComposerProject,
91 - BRAND_ASSET_PATHS.productionIconComposerProject,
92 - ]).toEqual([
93 - "assets/dev/app-icon.icon",
94 - "assets/nightly/app-icon.icon",
95 - "assets/prod/app-icon.icon",
96 - ]);
97 - expect(BRAND_ASSET_PATHS.developmentDesktopIconPng).toMatch(/^assets\/dev\/blueprint-/);
98 - expect(BRAND_ASSET_PATHS.nightlyMacIconPng).toMatch(/^assets\/nightly\/nightly-/);
99 - expect(BRAND_ASSET_PATHS.productionMacIconPng).toMatch(/^assets\/prod\/black-/);
100 - });
56 });
scripts/mobile-showcase.config.ts
+1 -1
@@ -12,7 +12,7 @@ export type { ShowcaseScene };
12 export type ShowcaseAppearance = "light" | "dark";
13
14 export const SHOWCASE_THEMES = MOBILE_THEME_IDS;
15 -export const DEFAULT_SHOWCASE_THEME = MOBILE_DEFAULT_THEME_ID;
15 +const DEFAULT_SHOWCASE_THEME = MOBILE_DEFAULT_THEME_ID;
16 export type ShowcaseTheme = MobileThemeId;
17
18 export interface ShowcaseStoreAssetSpec {
scripts/mobile-showcase.test.ts
+1 -30
@@ -3,8 +3,7 @@ import * as NodePath from "node:path";
3 import { assert, it } from "@effect/vitest";
4 import { PNG } from "pngjs";
5
6 -import showcaseConfig, {
7 - DEFAULT_SHOWCASE_THEME,
6 +import {
7 resolveShowcaseAndroidAbi,
8 SHOWCASE_THEMES,
9 type ShowcaseConfig,
@@ -263,34 +262,6 @@ it("enforces store screenshot count limits", () => {
262 assert.throws(() => validateStoreAssetCount(googleSpec, 9, false), /allows at most 8/u);
263 });
264
266 -it("defaults every device to the app's own palette", () => {
267 - assert.equal(DEFAULT_SHOWCASE_THEME, "t3-code");
268 - assert.equal(
269 - showcaseConfig.devices.every((device) => device.theme === DEFAULT_SHOWCASE_THEME),
270 - true,
271 - );
272 -});
273 -
274 -it("configures every default device with an exact upload-ready store target", () => {
275 - assert.deepStrictEqual(
276 - showcaseConfig.devices.map((device) => [
277 - device.id,
278 - device.platform === "ios" ? (device.orientation ?? "portrait") : null,
279 - device.storeAsset.directory,
280 - device.storeAsset.width,
281 - device.storeAsset.height,
282 - ]),
283 - [
284 - ["iphone-6.9", "portrait", "apple/iphone-6.9", 1320, 2868],
285 - ["iphone-6.5", "portrait", "apple/iphone-6.5", 1284, 2778],
286 - ["ipad-13", "landscape", "apple/ipad-13", 2752, 2064],
287 - ["pixel", null, "google-play/phone", 1080, 1920],
288 - ["android-tablet-7", null, "google-play/tablet-7", 1080, 1920],
289 - ["android-tablet-10", null, "google-play/tablet-10", 1440, 2560],
290 - ],
291 - );
292 -});
293 -
265 it("selects a reachable LAN IPv4 address", () => {
266 assert.equal(
267 selectLanIpv4Address([