Tests: scope grouped benchmark artifacts

This commit is contained in:
Gustavo Madeira Santana
2026-04-16 23:45:57 -04:00
parent 8e444ac5a6
commit e8ae3901b6
2 changed files with 25 additions and 3 deletions

View File

@@ -7,7 +7,10 @@ import {
resolveGroupKey,
resolveTestArea,
} from "../../scripts/lib/test-group-report.mjs";
import { parseTestGroupReportArgs } from "../../scripts/test-group-report.mjs";
import {
parseTestGroupReportArgs,
resolveReportArtifactDirs,
} from "../../scripts/test-group-report.mjs";
describe("scripts/test-group-report grouping", () => {
it("groups repo files by stable product area", () => {
@@ -201,3 +204,12 @@ describe("scripts/test-group-report arg parsing", () => {
});
});
});
describe("scripts/test-group-report artifact paths", () => {
it("keeps raw Vitest reports scoped to the output file stem", () => {
expect(resolveReportArtifactDirs(".artifacts/test-perf/baseline-before.json")).toEqual({
reportDir: path.join(".artifacts", "test-perf", "baseline-before", "vitest-json"),
logDir: path.join(".artifacts", "test-perf", "baseline-before", "logs"),
});
});
});