Preflight.Test

loom-builder-soltesttypescript
Path: loom-builder-sol/src/preflight.test.tsRelative: src/preflight.test.tsSubproject: loom-builder-solCategory: dispatch-system-sol
Lines: 173Bytes: 5,539Imports: 5Exports: 0has tests

Content Preview

  1. /**
  2. * Tests for token-cliff gate: pre-flight estimate, runtime ceiling, chain awareness.
  3. */
  4. import { describe, test, expect, afterAll } from "bun:test";
  5. import { readFileSync, writeFileSync, unlinkSync, existsSync, mkdirSync, rmSync } from "node:fs";
  6. import { join, resolve } from "node:path";
  7. import { estimateTokens, preflightCheck, type PreFlightError } from "./preflight.js";
  8. import type { DispatchSpec, DispatchOutcome } from "./types.js";
  9. const FIXTURES_DIR = resolve(import.meta.dir, "..",