test(mcp): align workflow assertions with current guidance

This commit is contained in:
morluto
2026-09-29 13:02:59 +08:00
parent f2dc749c86
commit f8bb113c22
4 changed files with 22 additions and 3 deletions
@@ -61,6 +61,25 @@ it("rejects non-absolute deep-link values", () => {
expect(result.success).toBe(false);
});
it("accepts any argument count while validating each argument", () => {
const input = electronActiveObservationInputSchema.parse({
executable_path: "/opt/electron",
application_path: "/opt/app/main.js",
application_root: "/opt/app",
args: Array.from({ length: 40 }, (_, index) => `--flag-${index}`),
});
expect(input.args).toHaveLength(40);
expect(
electronActiveObservationInputSchema.safeParse({
executable_path: "/opt/electron",
application_path: "/opt/app/main.js",
application_root: "/opt/app",
args: ["x".repeat(4_097)],
}).success,
).toBe(false);
});
it("redacts action inputs from Playwright failures", async () => {
const selector = "#secret-selector";
const input = electronActiveObservationInputSchema.parse({