settingsItemSecondaryText.test.ts 748 B

123456789101112131415161718192021222324
  1. import { readFile } from "node:fs/promises";
  2. import { describe, expect, it } from "vitest";
  3. const itemSources = [
  4. "../src/settings/SubagentsSection.tsx",
  5. "../src/settings/CommandCard.tsx",
  6. "../src/settings/SkillsSection.tsx",
  7. "../src/settings/McpServerList.tsx",
  8. "../src/settings/McpSettingsSection.tsx",
  9. "../src/settings/HooksList.tsx",
  10. "../src/settings/MemorySettingsViewer.tsx",
  11. "../src/settings/PluginStoreCard.tsx",
  12. ];
  13. describe("settings item secondary text", () => {
  14. it.each(itemSources)(
  15. "uses the secondary item typography in %s",
  16. async (path) => {
  17. const source = await readFile(new URL(path, import.meta.url), "utf8");
  18. expect(source).toContain("text-ui-sm text-foreground-subtle");
  19. },
  20. );
  21. });