16 lines
800 B
TypeScript
16 lines
800 B
TypeScript
import { readFile } from "node:fs/promises";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
describe("Go billing core compatibility fixture", () => {
|
|
it("freezes money, errors, idempotency, quote ordering, and exemptions", async () => {
|
|
const fixture = JSON.parse(await readFile("contracts/billing/core-v1.json", "utf8"));
|
|
expect(fixture).toMatchObject({
|
|
currency: "CNY", moneyUnit: "fen",
|
|
statuses: { insufficientBalance: 402, idempotencyConflict: 409 },
|
|
idempotencyKeys: { charge: "job-charge:{jobId}", refund: "job-refund:{jobId}" },
|
|
quote: { quantityRounding: "ceil", tiedWinner: "ambiguity_error", tierStandardFactors: "multiply", tierMarkupMultipliers: "maximum" },
|
|
exemptions: { billingDisabled: true, platformSuperAdminQuota: true }
|
|
});
|
|
});
|
|
});
|