implemented tests with karma