Skip to content

Commit

Permalink
default values for non-essential fields
Browse files Browse the repository at this point in the history
  • Loading branch information
harishv7 committed Jan 23, 2025
1 parent 3173ea5 commit acae41e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ describe("user.service", () => {
const email = "[email protected]"
// Setup active user
await setupUser({
name: "Active User",
userId: "active123",
email: email,
phone: "12345678",
isDeleted: false,
})

Expand All @@ -31,10 +28,7 @@ describe("user.service", () => {
const email = "[email protected]"
// Setup deleted user
await setupUser({
name: "Deleted User",
userId: "deleted123",
email: email,
phone: "12345678",
isDeleted: true,
})

Expand Down
12 changes: 6 additions & 6 deletions apps/studio/tests/integration/helpers/seed/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,14 +444,14 @@ export const setUpWhitelist = async ({
}

export const setupUser = async ({
name,
userId,
name = "Test User",
userId = nanoid(),
email,
phone,
phone = "",
isDeleted,
}: {
name: string
userId: string
name?: string
userId?: string
email: string
phone?: string
isDeleted: boolean
Expand All @@ -462,7 +462,7 @@ export const setupUser = async ({
id: userId,
name,
email,
phone: phone ?? "",
phone: phone,
deletedAt: isDeleted ? new Date() : null,
})
.returningAll()
Expand Down

0 comments on commit acae41e

Please sign in to comment.