Add pester-migration skill (experimental)#2163
Conversation
A self-contained, experimental skill that helps upgrade PowerShell Pester test suites across major versions (v3->v4, v4->v5, v5->v6). One router SKILL.md plus per-jump references. The v5->v6 guidance tracks Pester 6, which is still a release candidate. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔒 PR Risk Scan ResultsScanned 5 changed file(s).
|
|
🔴 Contributor Reputation Check: HIGH risk
Maintainers: please review this contributor before merging. |
There was a problem hiding this comment.
Pull request overview
Adds a new experimental skill, pester-migration, to guide users through upgrading PowerShell Pester test suites across major versions (v3→v4, v4→v5, v5→v6), with detailed per-jump reference guides and an updated skills index entry.
Changes:
- Introduces
skills/pester-migration/SKILL.mdas a router skill with version detection, migration workflow, cheat sheets, and safety rules. - Adds three bundled reference guides covering the v3→v4, v4→v5, and v5→v6 migration paths.
- Updates
docs/README.skills.mdto include the new skill and its bundled reference assets.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| skills/pester-migration/SKILL.md | New router skill and workflow for migrating Pester across major versions. |
| skills/pester-migration/references/v3-to-v4.md | New reference guide for v3→v4 migration. |
| skills/pester-migration/references/v4-to-v5.md | New reference guide for v4→v5 migration (Discovery/Run model changes). |
| skills/pester-migration/references/v5-to-v6.md | New reference guide for v5→v6 migration (RC-era breaking changes). |
| docs/README.skills.md | Adds the new skill entry to the generated skills index. |
|
Quick note on the two red checks — both look unrelated to the skill itself:
The skill passes the main |
Hello, I own the Pester framework, and also work at Microsoft on testing tools! 👋 |
- Pin the stable-v5 install to -MaximumVersion 5.99.99 so it keeps installing v5 after Pester 6 goes GA (SKILL.md). - Make the baseline run command version-agnostic (bare Invoke-Pester) and note that parameters differ across majors (SKILL.md). - Replace the '->' mapping arrows inside powershell fences with comment + valid replacement lines so snippets are copy/paste-safe (SKILL.md v5->v6 cheat sheet, v5-to-v6.md, and v3-to-v4.md). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sounds like totally high risk then 🤣. I need to review with the team who manage AGT on how they raise warnings. |
🔍 Vally Lint Results✅ All checks passed
Summary
Full linter output |
aaronpowell
left a comment
There was a problem hiding this comment.
couple of small suggestions
… references - Drop -SkipPublisherCheck from the default install commands; scope it to Windows PowerShell 5.1 (installing over the OS's Microsoft-signed built-in Pester 3) per pester.dev install docs, instead of an unconditional default. - Trim the experimental status callout: keep the preview marker, drop the date-based, human-oriented wording. - Reorder the References table into version progression order (v3->v4, v4->v5, v5->v6). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pull Request Checklist
skills/pester-migration/).npm startand verified that the generated index (docs/README.skills.md) is up to date.mainbranch for this pull request.Description
Adds
pester-migration, a self-contained skill that helps upgrade Pester (the PowerShell test framework) test suites across major versions: v3→v4, v4→v5, and v5→v6.It is built as a single router skill rather than several near-duplicate skills, because all the jumps share one workflow (detect version → baseline → mechanical fixes → manual review → verify). One
SKILL.mdroutes to a per-jump reference loaded on demand:SKILL.mdreferences/v4-to-v5.mdBeforeAllsetup,$PSScriptRootvs$MyInvocation,BeforeDiscovery/-ForEach, mock scoping,Should -Throwwildcards, fullInvoke-Pester→New-PesterConfigurationmapreferences/v5-to-v6.md-ForEachthrows, removedAssert-MockCalled, etc.)references/v3-to-v4.mdShould Be→Should -Be,Contain→FileContentMatch, renamesThe content is grounded in the official Pester migration and usage guides (pester.dev). It complements the existing
powershell-pester-5.instructions.md(which covers authoring v5 tests, not migrating between versions).Type of Contribution
Additional Notes
eng/validate-skills.mjsrules: frontmattername(pester-migration) matches the folder and is lowercase-hyphen;descriptionis within length limits and parses as YAML;references/is recognized as bundled assets. All internal links resolve.docs/README.skills.mdwas regenerated vianpm startand is included in this PR.By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.