File tree 1 file changed +8
-4
lines changed
packages/core/src/routes/admin-user
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 8
8
mockUserTotpMfaVerification ,
9
9
mockUserWithMfaVerifications ,
10
10
} from '#src/__mocks__/index.js' ;
11
+ import { type InsertUserResult } from '#src/libraries/user.js' ;
11
12
import type Libraries from '#src/tenants/Libraries.js' ;
12
13
import type Queries from '#src/tenants/Queries.js' ;
13
14
import { MockTenant , type Partial2 } from '#src/test-utils/tenant.js' ;
@@ -44,10 +45,13 @@ const mockLibraries = {
44
45
users : {
45
46
generateUserId : jest . fn ( async ( ) => 'fooId' ) ,
46
47
insertUser : jest . fn (
47
- async ( user : CreateUser ) : Promise < User > => ( {
48
- ...mockUser ,
49
- ...removeUndefinedKeys ( user ) , // No undefined values will be returned from database
50
- } )
48
+ async ( user : CreateUser ) : Promise < InsertUserResult > => [
49
+ {
50
+ ...mockUser ,
51
+ ...removeUndefinedKeys ( user ) , // No undefined values will be returned from database
52
+ } ,
53
+ { organizationIds : [ ] } ,
54
+ ]
51
55
) ,
52
56
updateUserById : jest . fn (
53
57
async ( _ , data : Partial < CreateUser > ) : Promise < User > => ( {
You can’t perform that action at this time.
0 commit comments