js-promise-library icon indicating copy to clipboard operation
js-promise-library copied to clipboard

Some tests need to verify that the callback is called

Open amitkeinan9 opened this issue 3 years ago • 1 comments

Screen Shot 2022-05-13 at 21 29 19

Since the assertion is in the then/catch/finally callback, the test passes if it's not called. I suggest creating a mock to validate the function is called.

amitkeinan9 avatar May 13 '22 18:05 amitkeinan9

I noticed this problem too. The better approach would be to use expect.assertions

romankrru avatar Aug 01 '22 13:08 romankrru