@@ -589,6 +589,7 @@ describe("Slack native command argument menus", () => {
589589 const commands = new Map < string , ( args : unknown ) => Promise < void > > ( ) ;
590590 const actions = new Map < string | RegExp , ( args : unknown ) => Promise < void > > ( ) ;
591591 const postEphemeral = vi . fn ( ) . mockResolvedValue ( { ok : true } ) ;
592+ const runtimeLog = vi . fn ( ) ;
592593 const app = {
593594 client : { chat : { postEphemeral } } ,
594595 command : ( name : string , handler : ( args : unknown ) => Promise < void > ) => {
@@ -604,7 +605,7 @@ describe("Slack native command argument menus", () => {
604605 } ;
605606 const ctx = {
606607 cfg : { commands : { native : true , nativeSkills : false } } ,
607- runtime : { } ,
608+ runtime : { log : runtimeLog } ,
608609 botToken : "bot-token" ,
609610 botUserId : "bot" ,
610611 teamId : "T1" ,
@@ -637,6 +638,12 @@ describe("Slack native command argument menus", () => {
637638 // Registration should not throw despite app.options() throwing
638639 await registerCommands ( ctx , account ) ;
639640 expect ( commands . size ) . toBeGreaterThan ( 0 ) ;
641+ expect ( runtimeLog ) . toHaveBeenCalledTimes ( 1 ) ;
642+ expect ( runtimeLog ) . toHaveBeenCalledWith (
643+ expect . stringContaining (
644+ "slack: external arg-menu registration failed; falling back to static slash command menus." ,
645+ ) ,
646+ ) ;
640647 expect (
641648 Array . from ( actions . keys ( ) ) . some (
642649 ( key ) => key instanceof RegExp && String ( key ) === String ( / ^ o p e n c l a w _ c m d a r g / ) ,
0 commit comments