import { readFileSync } from "node:fs"; import { join } from "node:path"; import { describe, expect, it } from "@suaveplan/testing/runner"; describe("dep-graph: runtime @suaveplan/* deps", () => { it("only depends on @suaveplan/error and @suaveplan/types", { timeout: 5000, }, () => { const pkgPath = join(import.meta.dirname, "..", "package.json"); const pkg = JSON.parse(readFileSync(pkgPath, "utf-8")) as { dependencies?: Record; }; const suaveDeps = Object.keys(pkg.dependencies ?? {}) .filter((dep) => dep.startsWith("@suaveplan/")) .sort(); expect(suaveDeps).toEqual( ["@suaveplan/error", "@suaveplan/types"].sort() ); }); });