2026-07-05 00:47:33 +00:00
|
|
|
import { expect, test } from "bun:test"
|
2026-07-05 01:12:45 +00:00
|
|
|
import { isOpenCodeEvent } from "../src/groups/event.js"
|
2026-07-05 00:47:33 +00:00
|
|
|
|
2026-07-05 01:12:45 +00:00
|
|
|
test("classifies public events by type", () => {
|
|
|
|
|
expect(isOpenCodeEvent({ type: "server.connected" })).toBe(true)
|
|
|
|
|
expect(isOpenCodeEvent({ type: "mcp.status.changed" })).toBe(true)
|
2026-07-07 18:34:29 +00:00
|
|
|
expect(isOpenCodeEvent({ type: "mcp.resources.changed" })).toBe(true)
|
2026-07-05 01:12:45 +00:00
|
|
|
expect(isOpenCodeEvent({ type: "mcp.tools.changed" })).toBe(false)
|
2026-07-05 00:47:33 +00:00
|
|
|
})
|