Docs feedback: Fix code coverage example for Pester (PowerShell)

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Link to doc: https://docs.gitlab.com/ee/ci/testing/code_coverage.html#test-coverage-examples

In #360737 (closed), I submitted an example for a code coverage regex for Pester (used for testing PowerShell). I discovered today while working with our own GitLab instance that this regex does not account for the case of 100% code coverage.

Can we please update this line in the doc:

  • Pester (PowerShell). Example: /Covered (\d+\.\d+%)/.

To this:

  • Pester (PowerShell). Example: /Covered (\d{1,3}\.?\d{0,2}%)/.

I verified the new example with regex101 for cases of 0%, between 0% and 100%, and 100%:

image.png

Here is an example pipeline output for 100%:

image.png

Which gives this pretty badge:

image.png

Edited by 🤖 GitLab Bot 🤖