mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-17 20:21:13 +00:00
refactor(plugins): print boundary success summary
This commit is contained in:
@@ -6,6 +6,7 @@ import { afterEach, describe, expect, it } from "vitest";
|
||||
import {
|
||||
acquireBoundaryCheckLock,
|
||||
cleanupCanaryArtifactsForExtensions,
|
||||
formatBoundaryCheckSuccessSummary,
|
||||
formatStepFailure,
|
||||
installCanaryArtifactCleanup,
|
||||
resolveBoundaryCheckLockPath,
|
||||
@@ -133,6 +134,26 @@ describe("check-extension-package-tsc-boundary", () => {
|
||||
expect(message).toContain("demo-plugin timed out after 5000ms");
|
||||
});
|
||||
|
||||
it("formats a success summary with counts and elapsed time", () => {
|
||||
expect(
|
||||
formatBoundaryCheckSuccessSummary({
|
||||
mode: "all",
|
||||
compileCount: 97,
|
||||
canaryCount: 12,
|
||||
elapsedMs: 54_321,
|
||||
}),
|
||||
).toBe(
|
||||
[
|
||||
"extension package boundary check passed",
|
||||
"mode: all",
|
||||
"compiled plugins: 97",
|
||||
"canary plugins: 12",
|
||||
"elapsed: 54321ms",
|
||||
"",
|
||||
].join("\n"),
|
||||
);
|
||||
});
|
||||
|
||||
it("keeps full failure output on the thrown error for canary detection", async () => {
|
||||
await expect(
|
||||
runNodeStepAsync(
|
||||
|
||||
Reference in New Issue
Block a user