Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { failureCount, renderReport } from "./verify-billing-boundary-baseline.mjs";
|
||||
|
||||
describe("verify-billing-boundary-baseline", () => {
|
||||
it("does not count successful gate output as failures", () => {
|
||||
expect(failureCount("lint", "warning only", "", 0)).toBe(0);
|
||||
expect(failureCount("vitest-billing-boundary", "Tests 30 passed", "", 0)).toBe(0);
|
||||
expect(failureCount("billing-inventory", "total matches: 12", "", 0)).toBe(0);
|
||||
});
|
||||
|
||||
it("counts failed typecheck diagnostics conservatively", () => {
|
||||
const output = "src/a.ts(1,1): error TS2307: Cannot find module\nsrc/b.ts(2,2): error TS2322: Type mismatch";
|
||||
|
||||
expect(failureCount("typecheck", output, "", 1)).toBe(2);
|
||||
});
|
||||
|
||||
it("renders required Billing Boundary report sections", () => {
|
||||
const report = renderReport([
|
||||
{
|
||||
id: "billing-inventory",
|
||||
command: "read-only billing inventory",
|
||||
exitCode: 0,
|
||||
durationMs: 10,
|
||||
failureCount: 0,
|
||||
fingerprint: { hash: "abc123", excerpt: "total matches: 0" },
|
||||
},
|
||||
]);
|
||||
|
||||
expect(report).toContain("# Billing Boundary Baseline Health");
|
||||
expect(report).toContain("## billing-inventory");
|
||||
expect(report).toContain("Output Fingerprint: abc123");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user