Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jest array contain object with prop

expect(state).toEqual(          // 1
  expect.arrayContaining([      // 2
    expect.objectContaining({   // 3
      type: 'END'               // 4
    })
  ])
)
 
PREVIOUS NEXT
Tagged: #jest #array #object #prop
ADD COMMENT
Topic
Name
3+3 =