File tree Expand file tree Collapse file tree
packages/cloud-api/__tests__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,10 +50,20 @@ const requireUser =
5050 ( c : unknown ) => Promise < { id : string ; wallet_address : string | null } >
5151 > ( ) ;
5252
53+ const requireUserOrApiKeyWithOrg =
54+ mock <
55+ ( c : unknown ) => Promise < {
56+ id : string ;
57+ organization_id : string ;
58+ organization : { id : string ; name : string ; is_active : boolean } ;
59+ } >
60+ > ( ) ;
61+
5362const buildRedisClient = mock < ( env : unknown ) => unknown > ( ) ;
5463
5564mock . module ( "@/lib/auth/workers-hono-auth" , ( ) => ( {
5665 requireUser,
66+ requireUserOrApiKeyWithOrg,
5767} ) ) ;
5868
5969mock . module ( "@/lib/cache/redis-factory" , ( ) => ( {
@@ -117,6 +127,7 @@ afterEach(() => {
117127 getByWalletAddress . mockReset ( ) ;
118128 usersServiceUpdate . mockReset ( ) ;
119129 requireUser . mockReset ( ) ;
130+ requireUserOrApiKeyWithOrg . mockReset ( ) ;
120131 buildRedisClient . mockReset ( ) ;
121132} ) ;
122133
You can’t perform that action at this time.
0 commit comments