Fix tests

This commit is contained in:
Adria Navarro 2023-09-25 09:48:27 +02:00
parent aee590bbba
commit 2530ebda2b
1 changed files with 2 additions and 3 deletions

View File

@ -10,14 +10,13 @@ import { authDetails } from "./sso"
import { uuid } from "./common"
import { generator } from "./generator"
import { tenant } from "."
import { generateGlobalUserID } from "../../../../src/docIds"
export const newEmail = () => {
return `${uuid()}@test.com`
}
export const user = (userProps?: Partial<Omit<User, "userId">>): User => {
const userId = userProps?._id || generateGlobalUserID()
const userId = userProps?._id
return {
_id: userId,
userId,
@ -53,7 +52,7 @@ export const adminOnlyUser = (userProps?: any): AdminOnlyUser => {
}
}
export const builderUser = (userProps?: any): BuilderUser => {
export const builderUser = (userProps?: Partial<User>): BuilderUser => {
return {
...user(userProps),
builder: {