mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-14 20:58:30 +00:00
9 lines
427 B
TypeScript
9 lines
427 B
TypeScript
import { expect, test } from "bun:test"
|
|
import { isOpenCodeEvent } from "../src/groups/event.js"
|
|
|
|
test("classifies public events by type", () => {
|
|
expect(isOpenCodeEvent({ type: "server.connected" })).toBe(true)
|
|
expect(isOpenCodeEvent({ type: "mcp.status.changed" })).toBe(true)
|
|
expect(isOpenCodeEvent({ type: "mcp.resources.changed" })).toBe(true)
|
|
expect(isOpenCodeEvent({ type: "mcp.tools.changed" })).toBe(false)
|
|
})
|