Initial Commit
This commit is contained in:
21
packages/foundation/data/serialize/tests/dep-graph.test.ts
Normal file
21
packages/foundation/data/serialize/tests/dep-graph.test.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
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<string, string>;
|
||||
};
|
||||
const suaveDeps = Object.keys(pkg.dependencies ?? {})
|
||||
.filter((dep) => dep.startsWith("@suaveplan/"))
|
||||
.sort();
|
||||
|
||||
expect(suaveDeps).toEqual(
|
||||
["@suaveplan/error", "@suaveplan/types"].sort()
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user