Added Karma unit test functionality.