chore(user-emails): fix test and code review changes

This commit is contained in:
Alessandro Magionami
2024-07-08 09:46:17 +02:00
parent c56afa3dc2
commit ef989d98f5
2 changed files with 4 additions and 6 deletions
@@ -3,7 +3,6 @@ import { createUser } from '@/modules/core/services/users'
import { beforeEachContext } from '@/test/hooks'
import { expect } from 'chai'
import { getUserByEmail } from '@/modules/core/repositories/users'
import { UserRecord } from '@/modules/core/helpers/types'
import crs from 'crypto-random-string'
function createRandomEmail() {
@@ -31,7 +30,7 @@ describe('Core @user-emails', () => {
})
// TODO: delete user email
const user = (await getUserByEmail('test@example.org')) as UserRecord
const user = (await getUserByEmail(email))!
expect(user.name).to.eq('John Doe')
expect(user.email).to.eq(email)
})
@@ -44,7 +43,7 @@ describe('Core @user-emails', () => {
password: createRandomPassword()
})
const user = (await getUserByEmail(email)) as UserRecord
const user = (await getUserByEmail(email))!
expect(user.name).to.eq('John Doe')
expect(user.email).to.eq(email)
})