This commit is contained in:
Gsk54
2023-01-05 17:30:19 +01:00
parent 33f6b11089
commit c480f2f030
3 changed files with 12 additions and 2 deletions

View File

@@ -46,10 +46,18 @@ describe('UsersRepository', () => {
});
});
it('should return an data array with users', async () => {
await createUsers(10);
it('should return a data array with 8 users', async () => {
await createUsers(8);
const users = await usersRepository.findAll();
expect(users.data.length).toBe(8);
expect(users.total).toBe(8);
});
it('should return a data array limited to 10 users', async () => {
await createUsers(20);
const users = await usersRepository.findAll();
expect(users.data.length).toBe(10);
expect(users.total).toBe(20);
});
});