Skip to content

Commit

Permalink
refactor: rebase master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
darcyYe committed Jun 12, 2024
1 parent 1ed8c0a commit 36b7582
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/core/src/routes/admin-user/mfa-verifications.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
mockUserTotpMfaVerification,
mockUserWithMfaVerifications,
} from '#src/__mocks__/index.js';
import { type InsertUserResult } from '#src/libraries/user.js';
import type Libraries from '#src/tenants/Libraries.js';
import type Queries from '#src/tenants/Queries.js';
import { MockTenant, type Partial2 } from '#src/test-utils/tenant.js';
Expand Down Expand Up @@ -44,10 +45,13 @@ const mockLibraries = {
users: {
generateUserId: jest.fn(async () => 'fooId'),
insertUser: jest.fn(
async (user: CreateUser): Promise<User> => ({
...mockUser,
...removeUndefinedKeys(user), // No undefined values will be returned from database
})
async (user: CreateUser): Promise<InsertUserResult> => [
{
...mockUser,
...removeUndefinedKeys(user), // No undefined values will be returned from database
},
{ organizationIds: [] },
]
),
updateUserById: jest.fn(
async (_, data: Partial<CreateUser>): Promise<User> => ({
Expand Down

0 comments on commit 36b7582

Please sign in to comment.