Added karma tests
modified test running rules