configure karma, add unit tests