A jasmine test spec walking through building a deferred promise implementation