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.

513 B
Raw Blame
import { describe, expect, it } from "vite-plus/test";
import { unwrapMember } from "./members.js";

describe("unwrapMember", () => {
  it("accepts the bare member Better Auth returns", () => {
    expect(unwrapMember({ id: "m1", role: "admin" })).toEqual({
      id: "m1",
      role: "admin",
    });
  });

  it("accepts the wrapped shape the OpenAPI document declares", () => {
    expect(unwrapMember({ member: { id: "m1", role: "admin" } })).toEqual({
      id: "m1",
      role: "admin",
    });
  });
});