settlekit/packages/github/test/github-access-revoker.test.ts
caelum0x 4afda54455 feat: monorepo scaffold + @settlekit/common contract package
- pnpm workspace, shared tsconfig, vitest
- common: ids, money (USDC base-unit math), Result/SettleKitError, time
- domain types: product, customer, payment, entitlement, delivery, integration
- 13 passing contract tests
2026-06-15 02:55:22 +03:00

22 lines
673 B
TypeScript

import { describe, expect, it } from "vitest";
import type { GitHubRepoAccessGrant } from "@settlekit/common";
import { markGitHubGrantRevoked } from "../src/index.js";
describe("markGitHubGrantRevoked", () => {
it("records revocation state", () => {
const grant = {
id: "ghra_1",
organizationId: "org_1",
installationId: 1,
customerId: "cus_1",
entitlementId: "ent_1",
repoOwner: "seller",
repoName: "repo",
githubUsername: "buyer",
status: "active",
createdAt: "2026-01-01T00:00:00.000Z",
} satisfies GitHubRepoAccessGrant;
expect(markGitHubGrantRevoked(grant).status).toBe("revoked");
});
});