jest check object code example
Example: jest check array of objects
test('id should match', () => {
const obj = {
id: '111',
productName: 'Jest Handbook',
url: 'https://jesthandbook.com'
};
expect(obj.id).toEqual('111');
});
test('id should match', () => {
const obj = {
id: '111',
productName: 'Jest Handbook',
url: 'https://jesthandbook.com'
};
expect(obj.id).toEqual('111');
});