Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
default values for non-essential fields
Browse files Browse the repository at this point in the history
harishv7 committed Jan 23, 2025
1 parent 6d549ec commit 75281ae
Showing 2 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -13,10 +13,7 @@ describe("user.service", () => {
const email = "active@example.com"
// Setup active user
await setupUser({
name: "Active User",
userId: "active123",
email: email,
phone: "12345678",
isDeleted: false,
})

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

12 changes: 6 additions & 6 deletions apps/studio/tests/integration/helpers/seed/index.ts
Original file line number Diff line number Diff line change
@@ -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
@@ -462,7 +462,7 @@ export const setupUser = async ({
id: userId,
name,
email,
phone: phone ?? "",
phone: phone,
deletedAt: isDeleted ? new Date() : null,
})
.returningAll()

0 comments on commit 75281ae

Please sign in to comment.