Promises are not a new concept to JavaScript, with popular implementations already provided by jQuery and Q. However, with the Promise abstraction now a built-in object in ECMAScript and appreciating more widespread browser support, it makes sense to start shifting towards this new interface.
Because of their asynchronous nature, promises can often be confusing to unit test. The purpose of this post will be to demonstrate a simple example of how one might apply TDD and build a test suite around a simple JavaScript service which returns a promise.
In the spirit of using new JS interfaces, we'll also be using the new Fetch API as our asynchronous behavior, and we'll be writing our unit tests in [Jasmine](http://jasmine.github.io/2.0/intro