import { describe, expect, it } from "vitest";
import { createFixtureHost } from "@thortiq/plugin-sdk/testing";
import plugin from "../src/native.js";

describe("Thortiq Example Note Editor native plugin", () => {
  it("activates, registers the refresh command, and disposes cleanly", async () => {
    const host = createFixtureHost({
      runtime: "native",
      notes: [{ id: "n1", title: "Synthetic note" }],
      settings: { label: "Synthetic label" },
    });
    await plugin.activate(host.api);
    await host.invokeCommand("refresh");
    await host.dispose();
    expect(host.disposed).toBe(true);
  });
});
