(name: 'show' | 'add' | 'refresh')
| 35 | let mockContext: CommandContext; |
| 36 | |
| 37 | const getSubCommand = (name: 'show' | 'add' | 'refresh'): SlashCommand => { |
| 38 | const subCommand = memoryCommand.subCommands?.find( |
| 39 | (cmd) => cmd.name === name, |
| 40 | ); |
| 41 | if (!subCommand) { |
| 42 | throw new Error(`/memory ${name} command not found.`); |
| 43 | } |
| 44 | return subCommand; |
| 45 | }; |
| 46 | |
| 47 | describe('/memory show', () => { |
| 48 | let showCommand: SlashCommand; |