mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
0303af17f3
* test: remove low-value implementation assertions * test: refresh native i18n inventory
27 lines
942 B
TypeScript
27 lines
942 B
TypeScript
// Plugin extension import boundary tests enforce plugin extension import rules.
|
|
import { readFileSync } from "node:fs";
|
|
import path from "node:path";
|
|
import { describe, expect, it } from "vitest";
|
|
import { main } from "../scripts/check-plugin-extension-import-boundary.mts";
|
|
import { createCapturedIo } from "./helpers/captured-io.js";
|
|
|
|
const repoRoot = process.cwd();
|
|
const baselinePath = path.join(
|
|
repoRoot,
|
|
"test",
|
|
"fixtures",
|
|
"plugin-extension-import-boundary-inventory.json",
|
|
);
|
|
const baseline = JSON.parse(readFileSync(baselinePath, "utf8"));
|
|
|
|
describe("plugin extension import boundary inventory", () => {
|
|
it("script json output matches the baseline exactly", 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(baseline);
|
|
});
|
|
});
|