Initial Commit
This commit is contained in:
28
packages/foundation/flow/retry/tests/dep-graph.test.ts
Normal file
28
packages/foundation/flow/retry/tests/dep-graph.test.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import { describe, expect, it } from "@suaveplan/testing/runner";
|
||||
|
||||
describe("dep-graph", () => {
|
||||
it("runtime @suaveplan/* deps are [@suaveplan/error, @suaveplan/events, @suaveplan/types] sorted", {
|
||||
timeout: 5000,
|
||||
}, () => {
|
||||
const pkg = JSON.parse(
|
||||
readFileSync(join(__dirname, "..", "package.json"), "utf8")
|
||||
) as { dependencies?: Record<string, string> };
|
||||
const runtime = Object.keys(pkg.dependencies ?? {})
|
||||
.filter((k) => k.startsWith("@suaveplan/"))
|
||||
.sort();
|
||||
expect(runtime).toEqual([
|
||||
"@suaveplan/error",
|
||||
"@suaveplan/events",
|
||||
"@suaveplan/types",
|
||||
]);
|
||||
});
|
||||
|
||||
it("no peerDependencies", { timeout: 5000 }, () => {
|
||||
const pkg = JSON.parse(
|
||||
readFileSync(join(__dirname, "..", "package.json"), "utf8")
|
||||
) as { peerDependencies?: Record<string, string> };
|
||||
expect(pkg.peerDependencies).toBeUndefined();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user