Pointer Hierarchy.Test

loom-sprint-scaffoldtesttypescript
Path: loom-sprint-scaffold/loom/tests/memory/pointer-hierarchy.test.tsRelative: loom/tests/memory/pointer-hierarchy.test.tsSubproject: loom-sprint-scaffoldCategory: tests
Lines: 188Bytes: 6,753Imports: 4Exports: 0has tests

Content Preview

  1. /**
  2. * PointerHierarchy tests (H4.4).
  3. *
  4. * Proves:
  5. * - memory_expand round-trips: put full text in fake BlobStore → expand returns it byte-identical
  6. * - Record not found → error
  7. * - episodic_ref is null → error
  8. * - BlobStore key missing → error
  9. */
  10. import { describe, expect, test } from "bun:test";
  11. import { Database } from "bun:sqlite";
  12. import { PointerHierarchy, createMemoryExpandHandler } from "../../src/memory/core/pointer-hierarchy";
  13. import { FakeD1, FakeBlobStore, setupMemoryD