File tree Expand file tree Collapse file tree 1 file changed +13
-18
lines changed
Expand file tree Collapse file tree 1 file changed +13
-18
lines changed Original file line number Diff line number Diff line change @@ -64,18 +64,21 @@ function expectMediaTimeoutClientConfigured(): void {
6464 ) ;
6565}
6666
67+ function mockResolvedFeishuAccount ( ) {
68+ resolveFeishuAccountMock . mockReturnValue ( {
69+ configured : true ,
70+ accountId : "main" ,
71+ config : { } ,
72+ appId : "app_id" ,
73+ appSecret : "app_secret" ,
74+ domain : "feishu" ,
75+ } ) ;
76+ }
77+
6778describe ( "sendMediaFeishu msg_type routing" , ( ) => {
6879 beforeEach ( ( ) => {
6980 vi . clearAllMocks ( ) ;
70-
71- resolveFeishuAccountMock . mockReturnValue ( {
72- configured : true ,
73- accountId : "main" ,
74- config : { } ,
75- appId : "app_id" ,
76- appSecret : "app_secret" ,
77- domain : "feishu" ,
78- } ) ;
81+ mockResolvedFeishuAccount ( ) ;
7982
8083 normalizeFeishuTargetMock . mockReturnValue ( "ou_target" ) ;
8184 resolveReceiveIdTypeMock . mockReturnValue ( "open_id" ) ;
@@ -483,15 +486,7 @@ describe("sanitizeFileNameForUpload", () => {
483486describe ( "downloadMessageResourceFeishu" , ( ) => {
484487 beforeEach ( ( ) => {
485488 vi . clearAllMocks ( ) ;
486-
487- resolveFeishuAccountMock . mockReturnValue ( {
488- configured : true ,
489- accountId : "main" ,
490- config : { } ,
491- appId : "app_id" ,
492- appSecret : "app_secret" ,
493- domain : "feishu" ,
494- } ) ;
489+ mockResolvedFeishuAccount ( ) ;
495490
496491 createFeishuClientMock . mockReturnValue ( {
497492 im : {
You can’t perform that action at this time.
0 commit comments