import { describe, expect, it } from "vitest";
import { parseMentions } from "./mentions";

describe("parseMentions", () => {
  it("parses user, here, channel, and everyone mentions", () => {
    expect(parseMentions("hi @alice and @here, also @channel @everyone")).toEqual([
      { kind: "user", handle: "alice" },
      { kind: "here" },
      { kind: "channel" },
      { kind: "everyone" },
    ]);
  });

  it("returns an empty array when there are no mentions", () => {
    expect(parseMentions("no mentions here")).toEqual([]);
  });
});
