Token Mint.Test

loom-sprint-scaffoldtesttypescript
Path: loom-sprint-scaffold/loom/tests/orchestrator/token-mint.test.tsRelative: loom/tests/orchestrator/token-mint.test.tsSubproject: loom-sprint-scaffoldCategory: tests
Lines: 180Bytes: 5,795Imports: 6Exports: 0has tests

Content Preview

  1. /**
  2. * Tests for TokenMint (H1.5).
  3. *
  4. * Proves:
  5. * - mint → Loop 3 verify passes (round-trip)
  6. * - expired tokens fail
  7. * - tampered tokens fail
  8. * - replayed tokens fail (single-use via consumed nonce)
  9. */
  10. import { describe, expect, test } from "bun:test";
  11. import { TokenMint, TokenError } from "../../src/orchestrator/core/token-mint";
  12. import { checkAllowlist } from "../../src/execution/reversibility-gate";
  13. import type { KVStore } from "../../src/orchestrator/core/types";
  14. import type { Dispatc