Checking code coverage is a very important activity while testing. Code coverage helps us understand how much code written by us is tested. You can refer to the karma-coverage (https://github.com/karma-runner/karma-coverage) module and the remap-istanbul (https://github.com/SitePen/remap-istanbul) module to implement code coverage.
You can also refer to How to Add a Test Coverage Report to an Angular 2 Project: https://www.angularonrails.com/add-test-coverage-report-angular-2-project/ for further reference.