@@ -235,7 +235,7 @@ describe("App <-> AppBridge integration", () => {
235235 expect ( receivedContexts ) . toEqual ( [ { theme : "dark" } ] ) ;
236236 } ) ;
237237
238- it . skip ( "setHostContext only sends changed values" /* TODO: v2 setHostContext does not diff (send full patch) */ , async ( ) => {
238+ it ( "setHostContext only sends changed values" , async ( ) => {
239239 const receivedContexts : unknown [ ] = [ ] ;
240240 app . onhostcontextchanged = ( params ) => {
241241 receivedContexts . push ( params ) ;
@@ -336,7 +336,7 @@ describe("App <-> AppBridge integration", () => {
336336 await newBridgeTransport . close ( ) ;
337337 } ) ;
338338
339- it . skip ( "getHostContext accumulates multiple partial updates" /* TODO: investigate accumulate behavior */ , async ( ) => {
339+ it ( "getHostContext accumulates multiple partial updates" , async ( ) => {
340340 // Need fresh transports for new bridge
341341 const [ newAppTransport , newBridgeTransport ] =
342342 InMemoryTransport . createLinkedPair ( ) ;
@@ -358,11 +358,11 @@ describe("App <-> AppBridge integration", () => {
358358 await newApp . connect ( newAppTransport ) ;
359359
360360 // Send partial update: only theme changes
361- newBridge . sendHostContextChange ( { theme : "dark" } ) ;
361+ newBridge . sendHostContextChanged ( { theme : "dark" } ) ;
362362 await flush ( ) ;
363363
364364 // Send another partial update: only containerDimensions change
365- newBridge . sendHostContextChange ( {
365+ newBridge . sendHostContextChanged ( {
366366 containerDimensions : { width : 1024 , maxHeight : 768 } ,
367367 } ) ;
368368 await flush ( ) ;
@@ -774,7 +774,7 @@ describe("App <-> AppBridge integration", () => {
774774 ) ;
775775 } ) ;
776776
777- it . skip ( "onlistresources setter registers handler for resources/list requests" /* covered by listServerResources test below */ , async ( ) => {
777+ it ( "onlistresources setter registers handler for resources/list requests" , async ( ) => {
778778 const requestParams = { } ;
779779 const resources = [ { uri : "test://resource" , name : "Test" } ] ;
780780 const receivedRequests : unknown [ ] = [ ] ;
@@ -791,7 +791,7 @@ describe("App <-> AppBridge integration", () => {
791791 const result = await app . listServerResources ( ) ;
792792
793793 expect ( receivedRequests ) . toHaveLength ( 1 ) ;
794- expect ( receivedRequests [ 0 ] ) . toMatchObject ( requestParams ) ;
794+ // v2: list* methods send undefined params when called with no args
795795 expect ( result . resources ) . toEqual ( resources ) ;
796796 } ) ;
797797
@@ -862,7 +862,7 @@ describe("App <-> AppBridge integration", () => {
862862 expect ( result . contents ) . toEqual ( contents ) ;
863863 } ) ;
864864
865- it . skip ( "onlistresourcetemplates setter registers handler /* TODO: v2 client.listResourceTemplates result shape */ for resources/templates/list requests " , async ( ) => {
865+ it ( "onlistresourcetemplates setter registers handler" , async ( ) => {
866866 const requestParams = { } ;
867867 const resourceTemplates = [
868868 { uriTemplate : "test://{id}" , name : "Test Template" } ,
@@ -880,11 +880,11 @@ describe("App <-> AppBridge integration", () => {
880880 const result = await app . client . listResourceTemplates ( ) ;
881881
882882 expect ( receivedRequests ) . toHaveLength ( 1 ) ;
883- expect ( receivedRequests [ 0 ] ) . toMatchObject ( requestParams ) ;
883+ // v2: list* methods send undefined params when called with no args
884884 expect ( result . resourceTemplates ) . toEqual ( resourceTemplates ) ;
885885 } ) ;
886886
887- it . skip ( "onlistprompts setter registers handler /* TODO: v2 client.listPrompts result shape */ for prompts/list requests " , async ( ) => {
887+ it ( "onlistprompts setter registers handler" , async ( ) => {
888888 const requestParams = { } ;
889889 const prompts = [ { name : "test-prompt" } ] ;
890890 const receivedRequests : unknown [ ] = [ ] ;
@@ -900,7 +900,7 @@ describe("App <-> AppBridge integration", () => {
900900 const result = await app . client . listPrompts ( ) ;
901901
902902 expect ( receivedRequests ) . toHaveLength ( 1 ) ;
903- expect ( receivedRequests [ 0 ] ) . toMatchObject ( requestParams ) ;
903+ // v2: list* methods send undefined params when called with no args
904904 expect ( result . prompts ) . toEqual ( prompts ) ;
905905 } ) ;
906906
@@ -1345,38 +1345,6 @@ describe("isToolVisibilityAppOnly", () => {
13451345 expect ( app . onteardown ) . toBe ( handler ) ;
13461346 } ) ;
13471347
1348- it . skip ( "direct setRequestHandler throws when called twice" /* v2: double-set protection removed (BREAKING.md) */ , ( ) => {
1349- const bridge2 = new AppBridge (
1350- createMockClient ( ) as Client ,
1351- testHostInfo ,
1352- testHostCapabilities ,
1353- ) ;
1354- bridge2 . setRequestHandler (
1355- // @ts -expect-error — exercising throw path with raw schema
1356- { shape : { method : { value : "test/method" } } } ,
1357- ( ) => ( { } ) ,
1358- ) ;
1359- expect ( ( ) => {
1360- bridge2 . setRequestHandler (
1361- // @ts -expect-error — exercising throw path with raw schema
1362- { shape : { method : { value : "test/method" } } } ,
1363- ( ) => ( { } ) ,
1364- ) ;
1365- } ) . toThrow ( / a l r e a d y r e g i s t e r e d / ) ;
1366- } ) ;
13671348
1368- it . skip ( "direct setNotificationHandler throws for event-mapped methods" /* v2: double-set protection removed */ , ( ) => {
1369- const app2 = new App ( testAppInfo , { } , { autoResize : false } ) ;
1370- app2 . addEventListener ( "toolinput" , ( ) => { } ) ;
1371- expect ( ( ) => {
1372- app2 . setNotificationHandler (
1373- // @ts -expect-error — exercising throw path with raw schema
1374- {
1375- shape : { method : { value : "ui/notifications/tool-input" } } ,
1376- } ,
1377- ( ) => { } ,
1378- ) ;
1379- } ) . toThrow ( / a l r e a d y r e g i s t e r e d / ) ;
1380- } ) ;
13811349 } ) ;
13821350} ) ;
0 commit comments