Add the deterministic, idempotent seed that brings a freshly provisioned throwaway repository to a known ground truth before a trial runs, scripted over the live Gitea API. - bench/seed-plan.ts: the pure ground truth (fixed labels, an issue spread across the discriminating dimensions, and labelled/reviewed/real-branch pull requests) plus groundTruth(user), realizing it into a RepoState. - bench/seed.ts: idempotent seeding reconciled by natural key, reusing gitea-axi's own tea-login credential discovery (no new secret handling). - A live smoke tier (test:bench:smoke) validating the seed end-to-end and skipping cleanly when no host is configured, kept out of the deterministic bench tier. Export selectLogin from src/context.ts so the bench reuses the exact credential-selection path.
17 lines
787 B
TypeScript
17 lines
787 B
TypeScript
import { defineConfig } from "vitest/config";
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
// The benchmark harness tier. The harness lives in bench/ (excluded from the
|
|
// published npm package) and its deterministic seams — the sample store,
|
|
// checker, guard, and aggregator — are unit-tested here, colocated with the
|
|
// source. It runs on its own via `test:bench` and is kept out of the main
|
|
// fast tier so bench code never counts against src coverage thresholds.
|
|
include: ["bench/**/*.test.ts"],
|
|
// The live seed smoke run is its own tier (vitest.bench-smoke.config.ts); it
|
|
// talks to a real Gitea host, so it stays out of this deterministic tier.
|
|
exclude: ["bench/**/*.smoke.test.ts", "**/node_modules/**"],
|
|
passWithNoTests: true,
|
|
},
|
|
});
|