mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
29 lines
942 B
TypeScript
29 lines
942 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import {
|
|
collectSrcExtensionImportBoundaryInventory,
|
|
main,
|
|
} from "../scripts/check-src-extension-import-boundary.mjs";
|
|
import { createCapturedIo } from "./helpers/captured-io.js";
|
|
|
|
describe("src extension import boundary inventory", () => {
|
|
it("stays empty", async () => {
|
|
expect(await collectSrcExtensionImportBoundaryInventory()).toEqual([]);
|
|
});
|
|
|
|
it("produces stable sorted output", async () => {
|
|
const first = await collectSrcExtensionImportBoundaryInventory();
|
|
const second = await collectSrcExtensionImportBoundaryInventory();
|
|
|
|
expect(second).toEqual(first);
|
|
});
|
|
|
|
it("script json output stays empty", async () => {
|
|
const captured = createCapturedIo();
|
|
const exitCode = await main(["--json"], captured.io);
|
|
|
|
expect(exitCode).toBe(0);
|
|
expect(captured.readStderr()).toBe("");
|
|
expect(JSON.parse(captured.readStdout())).toEqual([]);
|
|
});
|
|
});
|