import { describe, expect, it } from "vitest"; import { buildQaSuiteSummaryJson } from "./suite.js";
describe("buildQaSuiteSummaryJson", () => { const baseParams = { // Test scenarios include a `steps: []` field to match the real suite // scenario-result shape so downstream consumers that rely on the shape // (parity gate, report render) stay aligned.
scenarios: [
{ name: "Scenario A", status: "pass" as const, steps: [] },
{ name: "Scenario B", status: "fail" as const, details: "something broke", steps: [] },
],
startedAt: new Date("2026-04-11T00:00:00.000Z"),
finishedAt: new Date("2026-04-11T00:05:00.000Z"),
providerMode: "mock-openai" as const,
primaryModel: "openai/gpt-5.4",
alternateModel: "openai/gpt-5.4-alt",
fastMode: true,
concurrency: 2,
};
it("includes scenarioIds in run metadata when provided", () => { const scenarioIds = ["approval-turn-tool-followthrough", "subagent-handoff", "memory-recall"]; const json = buildQaSuiteSummaryJson({
...baseParams,
scenarioIds,
});
expect(json.run.scenarioIds).toEqual(scenarioIds);
});
it("treats an empty scenarioIds array as unspecified (no filter)", () => { // A CLI path that omits --scenario passes an empty array to runQaSuite. // The summary must encode that as null so downstream parity/report // tooling doesn't interpret a full run as an explicit empty selection. const json = buildQaSuiteSummaryJson({
...baseParams,
scenarioIds: [],
});
expect(json.run.scenarioIds).toBeNull();
});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.