File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -227,10 +227,19 @@ test("should respect server capabilities", async () => {
227227 await expect ( client . listResources ( ) ) . resolves . not . toThrow ( ) ;
228228 await expect ( client . listTools ( ) ) . resolves . not . toThrow ( ) ;
229229
230- // This should throw because prompts are not supported
230+ // These should throw because prompts, logging, and completions are not supported
231231 await expect ( client . listPrompts ( ) ) . rejects . toThrow (
232232 "Server does not support prompts" ,
233233 ) ;
234+ await expect ( client . setLoggingLevel ( "error" ) ) . rejects . toThrow (
235+ "Server does not support logging" ,
236+ ) ;
237+ await expect (
238+ client . complete ( {
239+ ref : { type : "ref/prompt" , name : "test" } ,
240+ argument : { name : "test" , value : "test" } ,
241+ } ) ,
242+ ) . rejects . toThrow ( "Server does not support completions" ) ;
234243} ) ;
235244
236245test ( "should respect client notification capabilities" , async ( ) => {
Original file line number Diff line number Diff line change @@ -237,9 +237,9 @@ export class Client<
237237 break ;
238238
239239 case "completion/complete" :
240- if ( ! this . _serverCapabilities ?. prompts ) {
240+ if ( ! this . _serverCapabilities ?. completions ) {
241241 throw new Error (
242- `Server does not support prompts (required for ${ method } )` ,
242+ `Server does not support completions (required for ${ method } )` ,
243243 ) ;
244244 }
245245 break ;
You can’t perform that action at this time.
0 commit comments