Is it possible to do diff coverage for angular 9 projects?

Viewed 81

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.

1 Answers

Unfortunately, at the moment Azure DevOps supports only .NET and .NET core projects using the Visual Studio code coverage results format.

From Code coverage for pull requests:

While you can collect and publish code coverage results for many different languages using Azure Pipelines, the code coverage for pull requests feature discussed in this document is currently available only for .NET and .NET core projects using the Visual Studio code coverage results format (file extension .coverage). Support for other languages and coverage formats will be added in future milestones.

Related