While Kotlin supports this, I haven't been able to find a way to achieve the same in Jest. My problem arises from having intricate interfaces and arrays of these interfaces where specifying all attribute values is not ideal. Here's an example of what I'm aiming for:
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)