score:2

Accepted answer

looks like you're passing e.target to wrapper.simulate...

...just change that to e and it should work:

it("should call props.cellclick() whith e.target argument", () => {
  wrapper.simulate("click", e);  // <= pass e
  expect(cellclick.mock.calls[0][0]).tobe(e.target);  // success!
});

Related Query

More Query from same tag