I am currently working on an angular 9 for my front end and .Net CORE for my backend. I have been able to implement the diff coverage for the backend project by doing the below:
In my azure-pipeline.yml
- task: DotNetCoreCLI@2
inputs:
command: test
projects: '**/*Tests/*.csproj'
arguments: '--configuration $(buildConfiguration) --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura'
displayName: 'Run backend endpoint tests'
Then I added azurepipelines-coverage.yml with the below:
coverage:
status: # Code coverage status will be posted to pull requests based on targets defined below.
comments: on # Off by default. When on, details about coverage for each file changed will be posted as a pull request comment.
diff: # Diff coverage is code coverage only for the lines changed in a pull request.
target: 60% # Set this to a desired percentage. Default is 70 percent
I was wondering if it is possible to do the same for my angular project? I am using jest to do my tests.