Initial Commit
This commit is contained in:
21
packages/foundation/flow/streams/tests/dep-graph.test.ts
Normal file
21
packages/foundation/flow/streams/tests/dep-graph.test.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { describe, expect, it } from "@suaveplan/testing/runner";
|
||||
|
||||
describe("dep-graph", () => {
|
||||
it("has no circular imports in the main barrel", {
|
||||
timeout: 30000,
|
||||
}, async () => {
|
||||
// Import the main barrel — if this resolves without error, no circular dep crash
|
||||
const mod = await import("../src/index.js");
|
||||
expect(typeof mod).toBe("object");
|
||||
expect(typeof mod.fromArray).toBe("function");
|
||||
expect(typeof mod.mapStream).toBe("function");
|
||||
expect(typeof mod.toArray).toBe("function");
|
||||
expect(typeof mod.pipeline).toBe("function");
|
||||
});
|
||||
|
||||
it("exports StreamError", { timeout: 30000 }, async () => {
|
||||
const { StreamError, STREAM_CODES } = await import("../src/index.js");
|
||||
expect(StreamError).toBeDefined();
|
||||
expect(STREAM_CODES.ABORTED).toBe("STREAM.ABORTED");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user