import { readFile } from "node:fs/promises";
import { resolve } from "node:path";
import { describe, expect, it } from "vitest";
import { validatePluginManifestV2 } from "@thortiq/plugin-api";

describe("manifest", () => {
  it("is a valid manifest-v2 document", async () => {
    const manifest = JSON.parse(
      await readFile(resolve("manifest.json"), "utf8"),
    );
    expect(validatePluginManifestV2(manifest)).toMatchObject({ ok: true });
  });
});
