Skip to content

Update Pester test guidance in community style guidelines#2444

Merged
johlju merged 2 commits intodsccommunity:mainfrom
johlju:fix/instructions-jan2026
Jan 31, 2026
Merged

Update Pester test guidance in community style guidelines#2444
johlju merged 2 commits intodsccommunity:mainfrom
johlju:fix/instructions-jan2026

Conversation

@johlju
Copy link
Member

@johlju johlju commented Jan 31, 2026

Pull Request (PR) description

  • SqlServerDsc
    • Updated Pester test guidance in AI instructions in community style guidelines.

This Pull Request (PR) fixes the following issues

None.

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).
  • Resource documentation updated in the resource's README.md.
  • Resource parameter descriptions updated in schema.mof.
  • Comment-based help updated, including parameter descriptions.
  • Localization strings updated.
  • Examples updated.
  • Unit tests updated. See DSC Community Testing Guidelines.
  • Integration tests updated (where possible). See DSC Community Testing Guidelines.
  • Code changes adheres to DSC Community Style Guidelines.

This change is Reviewable

@johlju johlju requested a review from a team as a code owner January 31, 2026 10:58
@coderabbitai
Copy link

coderabbitai bot commented Jan 31, 2026

Walkthrough

Updates to Pester testing style guidelines: disallowed assertion patterns expanded to include -Contain $true/-Contain $false; ForEach/data-driven guidance reworded to use separate BeforeDiscovery; added InModuleScope guidance to run Set-StrictMode -Version 1.0 before invoking tested functions; strengthened call-count assertion wording; changelog entry added.

Changes

Cohort / File(s) Summary
Pester Style Guidelines
​.github/instructions/dsc-community-style-guidelines-pester.instructions.md
Expanded disallowed assertions to include -Contain $true/-Contain $false; moved/reworded ForEach guidance to use separate BeforeDiscovery; added InModuleScope guidance to call Set-StrictMode -Version 1.0 before invoking functions; clarified call-count assertions to use Should -Invoke -Exactly -Times <n> -Scope It and assert counts inside It.
Changelog
CHANGELOG.md
Added Unreleased entry noting updated Pester test guidance in community style guidelines (documentation-only change).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: updating Pester test guidance in community style guidelines, which directly matches the primary modifications in the changeset.
Description check ✅ Passed The description is directly related to the changeset, explaining that Pester test guidance in AI instructions within community style guidelines was updated, and confirming the changelog entry was added.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/instructions/dsc-community-style-guidelines-pester.instructions.md:
- Around line 55-62: The headings "File Organization" and "Data-Driven Tests
(Test Cases)" in the markdown lack a blank line after them; update the document
to insert a single empty line immediately after each heading (and similarly
ensure any code block or list following a heading is preceded by one blank line)
so the headings comply with the style guideline—apply this update around the
sections containing "Class resources: `tests/Unit/Classes/{Name}.Tests.ps1`" and
the `-ForEach` guidance.

@codecov
Copy link

codecov bot commented Jan 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94%. Comparing base (dfe01bc) to head (ff8a3c4).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2444   +/-   ##
=====================================
  Coverage     94%     94%           
=====================================
  Files        225     225           
  Lines      10769   10769           
=====================================
  Hits       10142   10142           
  Misses       627     627           
Flag Coverage Δ
unit 94% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@johlju johlju merged commit 2ec3287 into dsccommunity:main Jan 31, 2026
37 of 39 checks passed
@johlju johlju deleted the fix/instructions-jan2026 branch January 31, 2026 14:19
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.

1 participant