Fixed improper use of beforeEach/afterEach in Jasmine
Added async tests for Jasmine