settingsHookRowContent.test.ts 610 B

123456789101112131415161718
  1. import { readFile } from "node:fs/promises";
  2. import { describe, expect, it } from "vitest";
  3. describe("settings Hook row content", () => {
  4. it("does not render the backing configuration path", async () => {
  5. const source = await readFile(
  6. new URL("../src/settings/HooksList.tsx", import.meta.url),
  7. "utf8",
  8. );
  9. expect(source).toContain("{command}");
  10. expect(source).not.toContain("{path}</p>");
  11. expect(source).not.toContain("text-foreground-subtle/60");
  12. expect(source).toContain(
  13. 'className="mt-1 truncate font-mono text-ui-sm text-foreground-subtle"',
  14. );
  15. });
  16. });