GA-MO / react-confirm-alert

react component confirm dialog.
https://ga-mo.github.io/react-confirm-alert/demo/
MIT License
273 stars 105 forks source link

Not able to mock in jest #48

Open DracoRunner opened 4 years ago

DracoRunner commented 4 years ago

Hi i need help on testing, I am writing unit test cases but when i am trying to mock this but not able to mock confirm alert please help me to do this .

gurmeetsinghmalhotra commented 4 years ago

@MahiBaghel Were you able to solve this out? I am facing a similar issue.

ar-lk commented 2 years ago

Anyone found a way to do testing with this. or a way to mock this? needed a solution for this

alextate4 commented 1 year ago

I am running into similar issues. I can mock this and test that it was called but I do not know a way to test all the functions inside of it.