Skip to content

feat: edge-case recursive Pester commands - #48

Draft
johlju wants to merge 1 commit into
viscalyx:mainfrom
johlju:f/improve-edge-case
Draft

feat: edge-case recursive Pester commands#48
johlju wants to merge 1 commit into
viscalyx:mainfrom
johlju:f/improve-edge-case

Conversation

@johlju

@johlju johlju commented Jun 30, 2026

Copy link
Copy Markdown
Member

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

Task list

  • Added an entry to the change log under the Unreleased section of the
    file CHANGELOG.md. Entry should say what was changed and how that
    affects users (if applicable), and reference the issue being resolved
    (if applicable).
  • Documentation added/updated in README.md and source/WikiSource.
  • Comment-based help added/updated for all new/changed functions.
  • Localization strings added/updated in all localization files as appropriate.
  • Examples appropriately added/updated.
  • Unit tests added/updated. See DSC Community Testing Guidelines.
  • Integration tests added/updated (where applicable). See
    DSC Community Testing Guidelines.
  • New/changed code adheres to DSC Community Style Guidelines.

This change is Reviewable

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@johlju, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 2 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 67338d5f-7d2d-4fbe-a316-510bda804048

📥 Commits

Reviewing files that changed from the base of the PR and between 6895c44 and 65431ac.

📒 Files selected for processing (27)
  • debug.ps1
  • source/Private/Convert-AssertMockCalled.ps1
  • source/Private/Convert-ShouldBe.ps1
  • source/Private/Convert-ShouldBeExactly.ps1
  • source/Private/Convert-ShouldBeFalse.ps1
  • source/Private/Convert-ShouldBeGreaterOrEqual.ps1
  • source/Private/Convert-ShouldBeGreaterThan.ps1
  • source/Private/Convert-ShouldBeIn.ps1
  • source/Private/Convert-ShouldBeLessOrEqual.ps1
  • source/Private/Convert-ShouldBeLessThan.ps1
  • source/Private/Convert-ShouldBeLike.ps1
  • source/Private/Convert-ShouldBeLikeExactly.ps1
  • source/Private/Convert-ShouldBeNullOrEmpty.ps1
  • source/Private/Convert-ShouldBeOfType.ps1
  • source/Private/Convert-ShouldBeTrue.ps1
  • source/Private/Convert-ShouldContain.ps1
  • source/Private/Convert-ShouldHaveCount.ps1
  • source/Private/Convert-ShouldInvoke.ps1
  • source/Private/Convert-ShouldMatch.ps1
  • source/Private/Convert-ShouldMatchExactly.ps1
  • source/Private/Convert-ShouldNotThrow.ps1
  • source/Private/Convert-ShouldThrow.ps1
  • source/Private/Get-ExtentText.ps1
  • source/Private/Get-PesterCommandParameter.ps1
  • source/Public/Convert-PesterSyntax.ps1
  • tests/Integration/Syntax/v5/ShouldInvoke.Debug.v5.tests.ps1
  • tests/Unit/Private/Get-ExtentText.tests.ps1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

# continue
# }

$originalExtentText = Get-ExtentText -CommandAst $commandAst
@johlju

johlju commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

This got stuck. The command parameters have their own Extent.Text that must be updated too, for example ParameterFilter that can be see as an example here: https://github.com/viscalyx/PesterConverter/pull/48/changes#diff-d89504bb698262fe42da7fc491cafcfe1362b5f5f0f6480d591b505099da2f62

For this to work we have to change the Extent text for parameters, not just the top CommandAst.

I wonder if it is even worth the effort as this module will only be used for a short period of time.

@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.50649% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 99%. Comparing base (6895c44) to head (65431ac).

Files with missing lines Patch % Lines
source/Public/Convert-PesterSyntax.ps1 28% 5 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@         Coverage Diff         @@
##           main    #48   +/-   ##
===================================
- Coverage    99%    99%   -1%     
===================================
  Files        33     34    +1     
  Lines      1446   1474   +28     
===================================
+ Hits       1438   1464   +26     
- Misses        8     10    +2     
Flag Coverage Δ
unit 99% <93%> (-1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
source/Private/Convert-AssertMockCalled.ps1 100% <100%> (ø)
source/Private/Convert-ShouldBe.ps1 100% <100%> (ø)
source/Private/Convert-ShouldBeExactly.ps1 100% <100%> (ø)
source/Private/Convert-ShouldBeFalse.ps1 100% <100%> (ø)
source/Private/Convert-ShouldBeGreaterOrEqual.ps1 100% <100%> (ø)
source/Private/Convert-ShouldBeGreaterThan.ps1 100% <100%> (ø)
source/Private/Convert-ShouldBeIn.ps1 100% <100%> (ø)
source/Private/Convert-ShouldBeLessOrEqual.ps1 100% <100%> (ø)
source/Private/Convert-ShouldBeLessThan.ps1 100% <100%> (ø)
source/Private/Convert-ShouldBeLike.ps1 100% <100%> (ø)
... and 14 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants