github/awesome-copilot · pester-migration · SKILL.md
Pester迁移
用于跨主要版本升级PowerShell Pester测试套件的技能,涵盖v3→v4、v4→v5和v5→v6。包括Discovery/Run两阶段模型、将设置移入BeforeAll、$PSScriptRoot与$MyInvocation的区别、模拟变更(Assert-MockCalled改为Should -Invoke,移除回退)、Invoke-Pester参数改为PesterConfiguration、数据驱动的-ForEach/-TestCases以及v6破坏性变更。当用户要求升级、迁移或现代化Pester测试,修复升级Pester版本后损坏的*.Tests.ps1文件,或转换旧版Should/Invoke-Pester语法时使用。
这是公开 Agent Skill 的中文说明,由采集翻译或编辑润色,完整内容以上游 SKILL.md 为准。适用于 Cursor / Claude Code / Codex / Gemini。 打开上游 SKILL.md
安装
通用(npx skills)
npx skills add github/awesome-copilot -s pester-migration
Cursor
把该 Skill 复制到项目的 .cursor/skills/pester-migration/ 目录
Claude Code
npx skills add github/awesome-copilot -a claude-code -s pester-migration