test: remove low-signal test files (#8397)
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com> Co-authored-by: Julius Marminge <[email protected]>
This commit is contained in:
1 parent
a6797b3b97
commit
73f8cfc023
8 files changed
-135
No files matched your search
@@ -1,14 +0,0 @@
|
||||
import { describe, expect, it } from "vite-plus/test";
|
||||
|
||||
import { resolveMobileStageLabel } from "./mobileBranding";
|
||||
|
||||
describe("resolveMobileStageLabel", () => {
|
||||
it.each([
|
||||
["development", "Dev"],
|
||||
["preview", "Nightly"],
|
||||
["production", "Alpha"],
|
||||
[undefined, "Alpha"],
|
||||
])("maps %s builds to %s", (appVariant, expected) => {
|
||||
expect(resolveMobileStageLabel(appVariant)).toBe(expected);
|
||||
});
|
||||
});
|
||||
@@ -1,11 +0,0 @@
|
||||
import { assert, describe, it } from "@effect/vitest";
|
||||
|
||||
import { normalizeModelMetricLabel } from "./Attributes.ts";
|
||||
|
||||
describe("Attributes", () => {
|
||||
it("groups GPT-family models under a shared metric label", () => {
|
||||
assert.strictEqual(normalizeModelMetricLabel("gpt-4o"), "gpt");
|
||||
assert.strictEqual(normalizeModelMetricLabel("gpt-5.4"), "gpt");
|
||||
assert.strictEqual(normalizeModelMetricLabel("claude-sonnet-4"), "claude");
|
||||
});
|
||||
});
|
||||
@@ -1,15 +0,0 @@
|
||||
import { describe, expect, it } from "vite-plus/test";
|
||||
|
||||
import { resolveAssetUrl } from "./assetUrls";
|
||||
|
||||
describe("resolveAssetUrl", () => {
|
||||
it("resolves an environment-relative asset URL", () => {
|
||||
expect(
|
||||
resolveAssetUrl("https://environment.example/base/", "/api/assets/signed-token/favicon.png"),
|
||||
).toBe("https://environment.example/api/assets/signed-token/favicon.png");
|
||||
});
|
||||
|
||||
it("rejects an invalid environment base URL", () => {
|
||||
expect(resolveAssetUrl("not a URL", "/api/assets/signed-token/favicon.png")).toBeNull();
|
||||
});
|
||||
});
|
||||
@@ -1,31 +0,0 @@
|
||||
import { renderToStaticMarkup } from "react-dom/server";
|
||||
import { describe, expect, it } from "vite-plus/test";
|
||||
|
||||
import { StartTruncatedPath } from "./StartTruncatedPath";
|
||||
|
||||
describe("StartTruncatedPath", () => {
|
||||
it("keeps the filename at the visible end by truncating from the start", () => {
|
||||
const path = "apps/desktop/src/components/very/long/CommitDialog.tsx";
|
||||
|
||||
const markup = renderToStaticMarkup(<StartTruncatedPath path={path} />);
|
||||
|
||||
expect(markup).toContain('dir="rtl"');
|
||||
expect(markup).toMatch(
|
||||
/<bdi[^>]*>apps\/desktop\/src\/components\/very\/long\/CommitDialog\.tsx<\/bdi>/,
|
||||
);
|
||||
expect(markup).toContain("overflow-hidden");
|
||||
expect(markup).toContain("text-ellipsis");
|
||||
expect(markup).toContain("whitespace-nowrap");
|
||||
expect(markup).toContain("min-w-0");
|
||||
});
|
||||
|
||||
it("shows the full path in a tooltip", () => {
|
||||
const path = "apps/desktop/src/components/very/long/CommitDialog.tsx";
|
||||
|
||||
const markup = renderToStaticMarkup(<StartTruncatedPath path={path} />);
|
||||
|
||||
expect(markup).toContain('data-slot="tooltip-trigger"');
|
||||
expect(markup).toContain("data-base-ui-tooltip-trigger");
|
||||
expect(markup).toContain(path);
|
||||
});
|
||||
});
|
||||
@@ -1,13 +0,0 @@
|
||||
import { describe, expect, it } from "vite-plus/test";
|
||||
|
||||
import { createPreviewAutomationClientId } from "./previewAutomationClientId";
|
||||
|
||||
describe("createPreviewAutomationClientId", () => {
|
||||
it("creates bounded cryptographically random identities for independent host lifetimes", () => {
|
||||
const clientIds = Array.from({ length: 32 }, createPreviewAutomationClientId);
|
||||
|
||||
expect(new Set(clientIds).size).toBe(clientIds.length);
|
||||
expect(clientIds.every((clientId) => clientId.startsWith("preview-"))).toBe(true);
|
||||
expect(clientIds.every((clientId) => clientId.length <= 128)).toBe(true);
|
||||
});
|
||||
});
|
||||
@@ -1,19 +0,0 @@
|
||||
import { renderToStaticMarkup } from "react-dom/server";
|
||||
import { describe, expect, it } from "vite-plus/test";
|
||||
|
||||
import { Toggle, ToggleGroup } from "./toggle-group";
|
||||
|
||||
describe("toggle group segmented defaults", () => {
|
||||
it("derives the segmented item size from the variant", () => {
|
||||
const html = renderToStaticMarkup(
|
||||
<ToggleGroup variant="segmented" value={["a"]}>
|
||||
<Toggle value="a">A</Toggle>
|
||||
</ToggleGroup>,
|
||||
);
|
||||
|
||||
expect(html.match(/data-size="segmented"/g)).toHaveLength(2);
|
||||
expect(html).toContain("h-6");
|
||||
expect(html).toContain("dark:hover:bg-input/32");
|
||||
expect(html).toContain("dark:data-pressed:bg-input/72");
|
||||
});
|
||||
});
|
||||
@@ -1,12 +0,0 @@
|
||||
import { describe, expect, it } from "vite-plus/test";
|
||||
|
||||
import packageJson from "../package.json" with { type: "json" };
|
||||
import mainSource from "./main.tsx?raw";
|
||||
|
||||
describe("React Grab runtime boundary", () => {
|
||||
it("keeps the host renderer free of the React Grab overlay", () => {
|
||||
expect(mainSource).not.toMatch(/import\(["']react-grab["']\)/);
|
||||
expect(packageJson.dependencies).not.toHaveProperty("react-grab");
|
||||
expect(packageJson.devDependencies).not.toHaveProperty("react-grab");
|
||||
});
|
||||
});
|
||||
@@ -1,20 +0,0 @@
|
||||
import { describe, expect, it } from "@effect/vitest";
|
||||
|
||||
import {
|
||||
mixThemePreviewBase,
|
||||
STANDARD_THEME_PREVIEW_COLORS,
|
||||
THEME_PREVIEW_RENDER_SPECS,
|
||||
} from "./themePreview.js";
|
||||
|
||||
describe("theme preview", () => {
|
||||
it("keeps the desktop preview geometry stable across clients", () => {
|
||||
expect(THEME_PREVIEW_RENDER_SPECS.light!.accent.center).toEqual([0.72, 0.22]);
|
||||
expect(THEME_PREVIEW_RENDER_SPECS.dark!.accent.middleOpacity).toBe(0.62);
|
||||
expect(THEME_PREVIEW_RENDER_SPECS.dark!.action.center).toEqual([0.82, 0.18]);
|
||||
});
|
||||
|
||||
it("mixes the standard canvas bases in OKLab", () => {
|
||||
expect(mixThemePreviewBase(STANDARD_THEME_PREVIEW_COLORS.light!, "light")).toBe("#fdfdfd");
|
||||
expect(mixThemePreviewBase(STANDARD_THEME_PREVIEW_COLORS.dark!, "dark")).toBe("#0a0a0a");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user