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

22 lines
870 B
TypeScript

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");
});
});