Files
2026-05-27 23:29:53 +01:00

30 lines
926 B
TypeScript

import { readFileSync } from "node:fs";
import { describe, expect, it } from "@suaveplan/testing/runner";
describe("dep-graph", () => {
it("pins exact runtime dependency set", { timeout: 5000 }, () => {
const pkg = JSON.parse(
readFileSync(new URL("../package.json", import.meta.url), "utf8")
) as {
dependencies: Record<string, string>;
};
expect(Object.keys(pkg.dependencies).sort()).toEqual(
[
"@suaveplan/api-types",
"@suaveplan/error",
"@suaveplan/types",
"tslib",
"zod",
].sort()
);
});
it("root barrel has no export-star", { timeout: 5000 }, () => {
const src = readFileSync(
new URL("../src/index.ts", import.meta.url),
"utf8"
);
expect(src.includes("export *")).toBe(false);
});
});