Semantic Index.Test

loom-sprint-scaffoldtesttypescript
Path: loom-sprint-scaffold/loom/tests/memory/semantic-index.test.tsRelative: loom/tests/memory/semantic-index.test.tsSubproject: loom-sprint-scaffoldCategory: tests
Lines: 238Bytes: 9,598Imports: 5Exports: 0has tests

Content Preview

  1. /**
  2. * SemanticIndex contract test suite.
  3. *
  4. * Shared tests run against BOTH Fts5Index (with fake D1/SQLite) and
  5. * VectorizeIndex (with fake Vectorize + fake Embedder), proving parity
  6. * of the API surface.
  7. */
  8. import { describe, expect, test } from "bun:test";
  9. import { Database } from "bun:sqlite";
  10. import { Fts5Index, VectorizeIndex } from "../../src/memory/core/semantic-index";
  11. import type { SemanticIndex, MemoryRecord } from "../../src/types";
  12. import {
  13. FakeD1,
  14. FakeEmbedder,
  15. FakeVecto