How to test asynchronous JavaScript with Jasmine
blog.codeship.io