Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

613 B
Raw Blame
import { assert, describe, it } from "@effect/vitest"
import { SchemaRepresentation } from "effect"

describe("SchemaRepresentation.toMultiDocument", () => {
  it("wraps the root representation and preserves references", () => {
    const reference = { _tag: "String" as const, checks: [] }
    assert.deepStrictEqual(
      SchemaRepresentation.toMultiDocument({
        representation: { _tag: "Reference", $ref: "Value" },
        references: { Value: reference }
      }),
      {
        representations: [{ _tag: "Reference", $ref: "Value" }],
        references: { Value: reference }
      }
    )
  })
})