mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-22 18:25:32 -04:00
10 lines
427 B
TypeScript
10 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)
|
|
})
|