Answers for "jest match object properties"

0

jest match object properties

describe('location', () => {
  it('should return location object', () => {
    expect( /* Some object value...*/ )
      .toEqual(expect.objectContaining({
        locationId: expect.any(Number),
        geo: expect.any(Array),
        isFetching: expect.any(Boolean)
      }))
  })
})
Posted by: Guest on May-04-2022

Code answers related to "jest match object properties"

Code answers related to "Javascript"

Browse Popular Code Answers by Language