File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11import { describe , expect , it } from "bun:test"
22import type { PluginInput } from "@opencode-ai/plugin"
3+ import type { Event } from "@opencode-ai/sdk"
34import { OpenCoderPlugin } from "../src/plugin"
45
56describe ( "OpenCoderPlugin" , ( ) => {
@@ -41,11 +42,11 @@ describe("OpenCoderPlugin", () => {
4142 const result = await OpenCoderPlugin ( createMockContext ( ) )
4243
4344 // Event hook should be callable without throwing
44- const mockEvent = {
45- type : "session.created" as const ,
45+ const mockEvent : Event = {
46+ type : "session.idle" ,
4647 properties : { sessionID : "test-123" } ,
4748 }
48- await expect ( result . event ?.( { event : mockEvent as any } ) ) . resolves . toBeUndefined ( )
49+ await expect ( result . event ?.( { event : mockEvent } ) ) . resolves . toBeUndefined ( )
4950 } )
5051
5152 it ( "should have callable tool.execute.before hook" , async ( ) => {
You can’t perform that action at this time.
0 commit comments