Added karma tests