I'm new to Unit Testing with karma/jasmine, and I am trying to test two objects of the same type, but with different values. Which means, same properties but with different values on each object, like this:
let myFirstObject: myType = {
id: 1,
name: "name1",
//... some other properties,
}
let mySecondObject: myType = {
id: 2,
name: "name2",
//... some other properties,
}
it('should be a true comparison', () => {
expect(myFirstObject).toEqual(mySecondObject);
});
I want it to be true, because the type and the properties are equal (the structure is the same), although the values stored are different. But using jasmine .toEqual() only passes when both items are entirely equal (properties and values). How can I do this comparison of structure/type but not considering the values, in karma/jasmine?
(note: my project is in ionic/angularIO, if that matters)
Any ideas?