diff --git a/apps/nestjs-backend/src/features/auth/permission.service.spec.ts b/apps/nestjs-backend/src/features/auth/permission.service.spec.ts index 7c150c881..67fadefb3 100644 --- a/apps/nestjs-backend/src/features/auth/permission.service.spec.ts +++ b/apps/nestjs-backend/src/features/auth/permission.service.spec.ts @@ -51,7 +51,8 @@ describe('PermissionService', () => { it('should throw a ForbiddenException if collaborator is not found', async () => { const spaceId = 'space-id'; prismaServiceMock.collaborator.findMany.mockResolvedValue([]); - await expect(service['getRoleBySpaceId'](spaceId)).toBeNull(); + const result = await service['getRoleBySpaceId'](spaceId); + await expect(result).toBeNull(); }); });