feat(core): add embedded v2 session runtime and tool foundation (#30632)
This commit is contained in:
16
packages/core/test/opencode.test.ts
Normal file
16
packages/core/test/opencode.test.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { describe, expect } from "bun:test"
|
||||
import { Effect } from "effect"
|
||||
import { OpenCode } from "@opencode-ai/core/opencode"
|
||||
import { testEffect } from "./lib/effect"
|
||||
|
||||
const it = testEffect(OpenCode.layer)
|
||||
|
||||
describe("OpenCode.layer", () => {
|
||||
it.effect("exposes Sessions through the public embedded API", () =>
|
||||
Effect.gen(function* () {
|
||||
const opencode = yield* OpenCode.Service
|
||||
|
||||
expect(yield* opencode.sessions.list()).toBeArray()
|
||||
}),
|
||||
)
|
||||
})
|
||||
Reference in New Issue
Block a user