added tests + tests coverage plugin for karma. Also added Socket mock