Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

678 B
Raw Blame
import { describe, expect, it } from "vite-plus/test";
import { matchesWorkspaceName } from "./matches-workspace-name";

describe("matchesWorkspaceName", () => {
  it("accepts the exact name, ignoring surrounding spaces", () => {
    expect(matchesWorkspaceName("Acme", "Acme")).toBe(true);
    expect(matchesWorkspaceName("  Acme ", "Acme")).toBe(true);
  });

  it("rejects other casing, partial names, and empty input", () => {
    expect(matchesWorkspaceName("acme", "Acme")).toBe(false);
    expect(matchesWorkspaceName("Acm", "Acme")).toBe(false);
    expect(matchesWorkspaceName("", "Acme")).toBe(false);
    expect(matchesWorkspaceName("", "  ")).toBe(false);
  });
});