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.

628 B
Raw Blame
import { describe, expect, it } from "vite-plus/test";
import { isDeleteConfirmationValid } from "./is-delete-confirmation-valid";

describe("isDeleteConfirmationValid", () => {
  it("matches the email ignoring case and surrounding spaces", () => {
    expect(
      isDeleteConfirmationValid("  [email protected] ", "[email protected]"),
    ).toBe(true);
  });

  it("rejects anything else", () => {
    expect(isDeleteConfirmationValid("jo@example", "[email protected]")).toBe(
      false,
    );
    expect(isDeleteConfirmationValid("", "")).toBe(false);
    expect(isDeleteConfirmationValid("x", undefined)).toBe(false);
  });
});