Add pester-should-migration skill (experimental)#2164
Conversation
🔒 PR Risk Scan ResultsScanned 3 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 Agent Skill, pester-should-migration, to guide migrating classic Pester v5 Should -... assertions to Pester v6 Should-* assertions, and updates the generated skills index to include it.
Changes:
- Added
skills/pester-should-migration/SKILL.mdwith a step-by-step migration procedure, common conversions, and behavioral gotchas. - Added
skills/pester-should-migration/references/assertion-map.mdwith a detailed operator mapping and examples/workarounds. - Updated
docs/README.skills.mdto include the new skill entry.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| skills/pester-should-migration/SKILL.md | Introduces the skill instructions, workflow, and gotchas for migrating to Should-*. |
| skills/pester-should-migration/references/assertion-map.md | Provides the detailed v5→v6 assertion mapping reference used by the skill. |
| docs/README.skills.md | Adds the new skill to the skills index. |
50ad0bf to
53046f5
Compare
|
Closing in favor of #2163 ( |
|
Reopened — this is still active (another session is working on it). Please disregard my earlier close note; both this and #2163 remain open for now. |
Hello, I own the Pester framework, and also work at Microsoft on testing tools! 👋 |
53046f5 to
e6aca1d
Compare
Companion to the pester-migration skill. Focuses on the optional move from the classic v5 `Should -Be` assertion syntax to the new v6 `Should-*` assertions (e.g. `Should -Be` -> `Should-Be`). Includes a full operator-by-operator mapping and the behavioral gotchas (negation as a separate command, BeExactly -> Should-BeString -CaseSensitive, truthy/falsy vs strict bool, BeNullOrEmpty split, collections, pipeline unwrapping). Marked experimental/preview: verified against Pester 6.0.0-rc2; the new Should-* assertions may still change before the 6.0 release. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
e6aca1d to
fca7521
Compare
🔍 Vally Lint Results✅ All checks passed
Summary
Full linter output |
aaronpowell
left a comment
There was a problem hiding this comment.
Small suggestions here
| > **Status: experimental / preview.** This skill is new and tracks **Pester 6, which is still | ||
| > a release candidate** (`6.0.0-rc2` as of mid-2026) — the `Should-*` assertions may still shift | ||
| > before the final release; check the [release notes](https://github.com/pester/Pester/releases). | ||
| > It was authored and verified against **Pester 6.0.0-rc2**. Both assertion styles work side by | ||
| > side, so migrate incrementally, review the diff, and keep your suite green. |
There was a problem hiding this comment.
This kind of guidance is more for the human that it is for the agent, esp since the agent doesn't really have the concept of time, so I don't think it's ideal to include in the skill as that will become excessive tokens.
| > **Companion skill.** This skill covers the *optional* move to the new `Should-*` operators. | ||
| > To upgrade a suite across major Pester versions (v3→v4→v5→v6 — the runtime, mocks, and config), | ||
| > use the separate **pester-migration** skill. In v6 the classic `Should -Be` keeps working, so | ||
| > adopting `Should-*` is independent of any version bump. |
There was a problem hiding this comment.
Beyond the direct scope of this PR but I wonder if it'd be worthwhile to add a plugin that rolls these two skills up together
What
Adds a new
pester-should-migrationskill: a focused guide for migrating Pester tests from the classic v5Should -Beassertion syntax to the new v6Should-*assertions (note the hyphen, no space), e.g.Should -Be→Should-Be,Should -Not -BeNullOrEmpty→Should-NotBeNull.This is a companion to the
pester-migrationskill (#2163). That skill upgrades a suite across major versions (runtime/mocks/config); this one covers the separate, optional move to the newShould-*operators. In Pester 6 the classicShould -Bekeeps working, so adoptingShould-*is independent of any version bump.Contents
skills/pester-should-migration/SKILL.md— when to use, a 5-step procedure (find → map → check gotchas → verify → optionally enforceShould.DisableV5), a common-conversions table, and 7 behavioral gotchas.skills/pester-should-migration/references/assertion-map.md— full operator-by-operator mapping with before/after examples and workarounds for operators that have no direct equivalent.Experimental / preview
Marked experimental the same way as
pester-migration:(experimental)in the title,Experimental (preview)prefix in thedescription, and a status callout in the body. Every example was empirically verified against Pester 6.0.0-rc2; the new assertions may still change before the 6.0 release.Validation
npx @microsoft/vally-cli lint skills/pester-should-migration→ 3/3 checks passed (spec-compliance, valid-refs, orphan-files). The skills index (docs/README.skills.md) was regenerated to include the new row.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com