Fixed improper usage of beforeEach
Added async tests for Mocha