Skip to content

Instantly share code, notes, and snippets.

@NiGhTTraX
Last active February 12, 2017 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NiGhTTraX/27a451d6a99ba05570248839c7fdd4b7 to your computer and use it in GitHub Desktop.
Save NiGhTTraX/27a451d6a99ba05570248839c7fdd4b7 to your computer and use it in GitHub Desktop.
it('should delete the todo when using the delete button', function() {
const Delete = createSpy();
const onDeleteSpy = spy();
render(<Todo Delete={Delete} name="buy milk" onDelete={onDeleteSpy} />);
Delete.lastProps.onSubmit();
expect(onDeleteSpy).to.have.been.called;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment