Fix tests

This commit is contained in:
Adria Navarro 2023-09-20 10:59:09 +02:00
parent 35f1513e40
commit 244af30b6a
1 changed files with 10 additions and 6 deletions

View File

@ -153,9 +153,11 @@ describe("bbReferenceProcessor", () => {
expect(result).toEqual([ expect(result).toEqual([
{ {
...user, _id: user._id,
budibaseAccess: true, primaryDisplay: user.email,
_rev: expect.any(String), email: user.email,
firstName: user.firstName,
lastName: user.lastName,
}, },
]) ])
expect(cacheGetUsersSpy).toBeCalledTimes(1) expect(cacheGetUsersSpy).toBeCalledTimes(1)
@ -176,9 +178,11 @@ describe("bbReferenceProcessor", () => {
expect(result).toEqual( expect(result).toEqual(
[user1, user2].map(u => ({ [user1, user2].map(u => ({
...u, _id: u._id,
budibaseAccess: true, primaryDisplay: u.email,
_rev: expect.any(String), email: u.email,
firstName: u.firstName,
lastName: u.lastName,
})) }))
) )
expect(cacheGetUsersSpy).toBeCalledTimes(1) expect(cacheGetUsersSpy).toBeCalledTimes(1)