Something went wrong. Try again.
opencode v2 mirror
Something went wrong. Try again.
TypeScript
12345678910111213141516171819import { describe, expect, test } from "bun:test"import { Effect } from "effect"import { SessionsCursor } from "../src/groups/session.js"import { Session } from "@opencode/schema/session"
describe("SessionsCursor", () => { test("round trips without Node globals", async () => { const input = { workspace: undefined, search: "protocol", order: "desc" as const, anchor: { id: Session.ID.make("ses_test"), time: 1, direction: "next" as const }, } const cursor = SessionsCursor.make(input)
expect(await Effect.runPromise(SessionsCursor.parse(cursor))).toEqual(input) })})