I have an array:
const dummyArr = [
{ name: "a", city: "c1" },
{ name: "b", city: "c2" },
{ name: "z", city: "c3" }
]
I need to write a jasmine test, to verify if an element exists in an array with property name: b
.
Not sure if I can use arrayContaining
or objectContaining
here.
Note: I need to verify this within toHaveBeenCalledWith
expect(obj.setArray).toHaveBeenCalledWith("personalDetails", .......)