File tree Expand file tree Collapse file tree
extensions/mattermost/src/mattermost Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ describe("createMattermostDirectChannelWithRetry", () => {
144144 initialDelayMs : 10 ,
145145 } ) ,
146146 ) ;
147- await expect ( resolveRetryRun ( run ) ) . rejects . toThrow ( ) ;
147+ await expect ( resolveRetryRun ( run ) ) . rejects . toThrow ( "Mattermost API 400" ) ;
148148
149149 // Should not retry - only called once (400 is a client error, even though message contains "429")
150150 expect ( mockFetch ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -299,7 +299,7 @@ describe("createMattermostDirectChannelWithRetry", () => {
299299 initialDelayMs : 10 ,
300300 } ) ,
301301 ) ;
302- await expect ( resolveRetryRun ( run ) ) . rejects . toThrow ( ) ;
302+ await expect ( resolveRetryRun ( run ) ) . rejects . toThrow ( "Mattermost API 503" ) ;
303303
304304 expect ( mockFetch ) . toHaveBeenCalledTimes ( 3 ) ; // initial + 2 retries
305305 } ) ;
@@ -339,7 +339,7 @@ describe("createMattermostDirectChannelWithRetry", () => {
339339 initialDelayMs : 10 ,
340340 } ) ,
341341 ) ;
342- await expect ( resolveRetryRun ( run ) ) . rejects . toThrow ( ) ;
342+ await expect ( resolveRetryRun ( run ) ) . rejects . toThrow ( "AbortError" ) ;
343343
344344 expect ( mockFetch ) . toHaveBeenCalledTimes ( 1 ) ;
345345 expect ( abortSignal ) . toBeInstanceOf ( AbortSignal ) ;
You can’t perform that action at this time.
0 commit comments