mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-30 05:27:36 +02:00
Merged via squash.
Prepared head SHA: 27241bd089
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
44 lines
1.2 KiB
TypeScript
44 lines
1.2 KiB
TypeScript
import { describe, expect, it, vi } from "vitest";
|
|
|
|
const runMatrixQaLive = vi.hoisted(() => vi.fn());
|
|
|
|
vi.mock("./runners/contract/runtime.js", () => ({
|
|
runMatrixQaLive,
|
|
}));
|
|
|
|
import { runQaMatrixCommand } from "./cli.runtime.js";
|
|
|
|
describe("matrix qa cli runtime", () => {
|
|
it("rejects non-env credential sources for the disposable Matrix lane", async () => {
|
|
await expect(
|
|
runQaMatrixCommand({
|
|
credentialSource: "convex",
|
|
}),
|
|
).rejects.toThrow("Matrix QA currently supports only --credential-source env");
|
|
});
|
|
|
|
it("passes through default env credential source options", async () => {
|
|
runMatrixQaLive.mockResolvedValue({
|
|
reportPath: "/tmp/matrix-report.md",
|
|
summaryPath: "/tmp/matrix-summary.json",
|
|
observedEventsPath: "/tmp/matrix-events.json",
|
|
});
|
|
|
|
await runQaMatrixCommand({
|
|
repoRoot: "/tmp/openclaw",
|
|
outputDir: ".artifacts/qa-e2e/matrix",
|
|
providerMode: "mock-openai",
|
|
credentialSource: "env",
|
|
});
|
|
|
|
expect(runMatrixQaLive).toHaveBeenCalledWith(
|
|
expect.objectContaining({
|
|
repoRoot: "/tmp/openclaw",
|
|
outputDir: "/tmp/openclaw/.artifacts/qa-e2e/matrix",
|
|
providerMode: "mock-openai",
|
|
credentialSource: "env",
|
|
}),
|
|
);
|
|
});
|
|
});
|