@@ -147,11 +147,17 @@ describe("channelsCapabilitiesCommand", () => {
147147
148148 await channelsCapabilitiesCommand ( { channel : "slack" } , runtime ) ;
149149
150- const output = logs . join ( "\n" ) ;
151- expect ( output ) . toContain ( "Bot scopes" ) ;
152- expect ( output ) . toContain ( "User scopes" ) ;
153- expect ( output ) . toContain ( "chat:write" ) ;
154- expect ( output ) . toContain ( "users:read" ) ;
150+ expect ( logs ) . toStrictEqual ( [
151+ [
152+ "slack:default" ,
153+ "Support: chatTypes=direct" ,
154+ "Actions: send, broadcast, poll" ,
155+ "Bot: @openclaw" ,
156+ "Team: team" ,
157+ "Bot scopes (auth.scopes): chat:write" ,
158+ "User scopes (auth.scopes): users:read" ,
159+ ] . join ( "\n" ) ,
160+ ] ) ;
155161 } ) ;
156162
157163 it ( "prints Teams Graph permission hints when present" , async ( ) => {
@@ -186,9 +192,15 @@ describe("channelsCapabilitiesCommand", () => {
186192
187193 await channelsCapabilitiesCommand ( { channel : "msteams" } , runtime ) ;
188194
189- const output = logs . join ( "\n" ) ;
190- expect ( output ) . toContain ( "ChannelMessage.Read.All (channel history)" ) ;
191- expect ( output ) . toContain ( "Files.Read.All (files (OneDrive))" ) ;
195+ expect ( logs ) . toStrictEqual ( [
196+ [
197+ "msteams:default" ,
198+ "Support: chatTypes=direct" ,
199+ "Actions: send, broadcast, poll" ,
200+ "App: app-id" ,
201+ "Graph roles: ChannelMessage.Read.All (channel history), Files.Read.All (files (OneDrive))" ,
202+ ] . join ( "\n" ) ,
203+ ] ) ;
192204 } ) ;
193205
194206 it ( "installs an explicit optional channel before rendering capabilities" , async ( ) => {
@@ -229,6 +241,13 @@ describe("channelsCapabilitiesCommand", () => {
229241 . calls as unknown as Array < [ { reason ?: string } ] > ;
230242 const refreshParams = refreshCalls [ 0 ] ?. [ 0 ] ;
231243 expect ( refreshParams ?. reason ) . toBe ( "source-changed" ) ;
232- expect ( logs . join ( "\n" ) ) . toContain ( "Probe: linked" ) ;
244+ expect ( logs ) . toStrictEqual ( [
245+ [
246+ "whatsapp:default" ,
247+ "Support: chatTypes=direct" ,
248+ "Actions: send, broadcast, poll" ,
249+ "Probe: linked" ,
250+ ] . join ( "\n" ) ,
251+ ] ) ;
233252 } ) ;
234253} ) ;
0 commit comments