Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

787 B
Raw Blame
// @vitest-environment node
import { beforeEach, describe, expect, it, vi } from "vitest";
import { Engine } from "@/types/proto-es/v1/common_pb";

vi.mock("@/lib/i18n", () => ({
  default: {
    t: (key: string) => key,
  },
}));

vi.mock("@/stores", () => ({
  useSubscriptionV1Store: () => ({ currentPlan: 0 }),
}));

vi.mock("@/types", () => ({
  isValidInstanceName: () => true,
  languageOfEngineV1: () => "sql",
  unknownInstance: () => ({ title: "Unknown" }),
}));

describe("instanceV1HasExtraParameters", () => {
  beforeEach(() => {
    vi.resetModules();
  });

  it("supports TiDB extra connection parameters", async () => {
    const { instanceV1HasExtraParameters } = await import("./instance");
    expect(instanceV1HasExtraParameters(Engine.TIDB)).toBe(true);
  });
});