mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-03 10:54:08 +00:00
fix(scripts): bound Z.AI fallback repro output
This commit is contained in:
@@ -214,6 +214,13 @@ describe("scripts/test-projects changed-target routing", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("routes Z.AI fallback repro script changes through its regression test", () => {
|
||||
expect(resolveChangedTestTargetPlan(["scripts/zai-fallback-repro.ts"])).toEqual({
|
||||
mode: "targets",
|
||||
targets: ["test/scripts/zai-fallback-repro.test.ts"],
|
||||
});
|
||||
});
|
||||
|
||||
it("routes group visible reply config changes through channel delivery regressions", () => {
|
||||
expect(
|
||||
resolveChangedTestTargetPlan([
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { resolveZaiFallbackPnpmCommand } from "../../scripts/zai-fallback-repro.ts";
|
||||
import {
|
||||
appendBoundedReproOutput,
|
||||
resolveZaiFallbackPnpmCommand,
|
||||
} from "../../scripts/zai-fallback-repro.ts";
|
||||
|
||||
describe("zai fallback repro command resolution", () => {
|
||||
it("wraps Windows pnpm.cmd without Node shell argv", () => {
|
||||
@@ -24,4 +27,12 @@ describe("zai fallback repro command resolution", () => {
|
||||
windowsVerbatimArguments: true,
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps only a bounded child output tail", () => {
|
||||
const first = appendBoundedReproOutput({ text: "", truncatedChars: 0 }, "abcdef", 5);
|
||||
const second = appendBoundedReproOutput(first, "ghij", 5);
|
||||
|
||||
expect(first).toEqual({ text: "bcdef", truncatedChars: 1 });
|
||||
expect(second).toEqual({ text: "fghij", truncatedChars: 5 });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user