lundi 3 juillet 2017

How to test console.log output using Jest or other Javascript Testing Framework?

I have a function that runs asynchronously, console logging the numbers 1 through 5 in order after a random setTimeout. I want to write a test for this function using Jest. How do I write one that tests that the console.log is 1, 2, 3, 4, 5 ?

Aucun commentaire:

Enregistrer un commentaire