I should compare existing all fields and values from object1
in object2
example:
object1: {
user: {
id: 25,
name: "Elon"
}
};
object2: {
user: {
id: 25,
name: "Elon",
role: "admin"
},
rules: [
"edit"
]
}
compareFn(object1, object2); //true
I can write this function, but I think that it exist in some testing framework, but I have not found :(
Can you help me? Thx!