settlekit/packages/localization/test/localization.test.ts
caelum0x 3fe0c88942 feat: implement all 77 SettleKit packages with real code
Core engine: entitlements (§14), delivery action runner (§21).
Payment rails: arc (viem USDC verify), circle (REST), x402 middleware, payments, webhooks (HMAC), notifications (Resend).
Integrations: github (Octokit App), discord (REST v10).
Commerce: saas billing, bundles, license-keys, api-keys, file-delivery (signed URLs + SigV4), usage/credits, agent-services, escrow, marketplace-core, risk.
Persistence: database (Drizzle/Postgres, 48 tables §25).
Plus supporting domain packages.

561 tests passing across 117 files; tsc -b green for every package.
2026-06-15 03:24:19 +03:00

10 lines
355 B
TypeScript

import { describe, expect, it } from "vitest";
import { formatUsdc, translate } from "../src/index.js";
describe("localization", () => {
it("translates keys and formats USDC", () => {
expect(translate({ checkout: { en: "Checkout", tr: "Odeme" } }, "checkout", "tr")).toBe("Odeme");
expect(formatUsdc("25.5", "en")).toBe("25.5 USDC");
});
});