Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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');
});
Source by codewithhugo.com #
 
PREVIOUS NEXT
Tagged: #jest #check #array #objects
ADD COMMENT
Topic
Name
1+9 =