How to deal with promises in JavaScript unit tests?

Posted on September 10, 2015

One of my readers, Richard, sent me an email asking about promises in tests. It’s difficult to figure out how to put together a complete testing setup for code that uses promises, as there are so many different alternatives and so little information.

I wanted to help, so in this article, I’ll tell you exactly what to do when you need to use promises in unit tests:

  • How to integrate promises in unit tests
  • Which libraries can help?
  • 8 common promise-related testing scenarios
  • An example project showing how to put all of this together in practice

Head on over to the link to read more:

Promises in JavaScript Unit Tests: the Definitive Guide

Comments or questions?

If you have any comments or questions about this post, feel free to email me to jani@codeutopia.net, or use any of the other methods on the contact page.