Skip to main content

Posts

Showing posts from October, 2019

Getting started and working with Karma

Getting started and working with Karma In this article, I will talk about Installing and working with Karma for code coverage We will go step by step to get started using it. Pre-requisite - You are familiar with Angular coding and writing unit test cases. So let's get started!!       1. You need to install karma-coverage      a.     npm i karma-coverage 2.         Changes to karma.config (blue highlighted are changed/added ones and comments are in bold white underlined text) 3       module . exports = function ( config ) { 4.      config . set ({ 5.        basePath: '' , 6.        frameworks: [ 'jasmine' , '@angular-devkit/build-angular' ],        files: [ 8             { pattern: "app/**/*.+(ts|html)" }   --- added to se...