score:1

You have to get the function from the childs prop and call it. As it returns a promise you need to use async/await or return the promise from your test, have a look at docs for more infos. Then test the state of the rendered component.

it("should update item accordingly", async() => {
    const rendered = shallow(React.createElement(Item));
    await rendered.find('someChild).prop('updateItem')('someId')
    expect(item.state).toEqual({
      item: {blah:'blah'}
    })
})

Related Query

More Query from same tag