I know we can do it in Kotlin but I did not find it with Jest. I have complex interfaces and array of those interfaces and I do not want to specify all values of all attributes of the interface. Below I made an example of what I would like:
interface User {
name: string
lastname: string
age: number
phone: string
password: string
friend: User[] | undefined
}
const user: User = mock()
user.age = 35
incrementAge(user)
expect(user.age).toBe(36)