modelProviderSettingsWidth.test.ts 676 B

123456789101112131415161718
  1. import { readFileSync } from "node:fs";
  2. import { describe, expect, it } from "vitest";
  3. describe("model provider settings width", () => {
  4. it("keeps the settings page on the shared 4xl width and widens only the model dialog", () => {
  5. const settingsPage = readFileSync(new URL("../src/SettingsPage.tsx", import.meta.url), "utf8");
  6. const modelDialog = readFileSync(
  7. new URL(
  8. "../src/settings/model-provider-section/ProviderModelMetadataDialog.tsx",
  9. import.meta.url,
  10. ),
  11. "utf8",
  12. );
  13. expect(settingsPage).not.toContain('activeSection === "modelProvider" && "max-w-6xl"');
  14. expect(modelDialog).toContain("max-w-2xl");
  15. });
  16. });