Pester Should 断言迁移

原名:pester-should-migration

把 Pester 5 的传统 Should 语法迁移到 Pester 6 新断言形式。

中文 Skills 技能说明

适合 PowerShell 测试升级。该能力标注为预览,先在分支中小批转换并运行完整测试;不能只做文本替换后就认为语义一致。

上游能力依据

上游原始适用说明:Experimental (preview) Pester skill for migrating classic Should -Be (v5) assertion syntax to the new Should- (v6) assertions (note the hyphen, no space), e.g. Should -Be -> Should-Be, Should -Not -Be -> Should-NotBe. Tracks Pester 6, which is still a release candidate, so this guidance may change; verified against Pester 6.0.0-rc2. Use when converting Pester v5 assertions to Pester v6 Should- operators, modernizing a Pester test suite, or when a user asks to migrate, convert, or rewrite Should -... calls in .Tests.ps1 / PowerShell files.

上游 SKILL.md 主要章节(保留原文标题):

使用边界

先复现问题并固定测试范围,再生成或执行测试。测试通过只能证明已覆盖的场景,不能代替生产环境验收。

作者、翻译与许可证

原作者
GitHub, Inc. 与 awesome-copilot contributors
中文翻译
CEOFans翻译
许可证
MIT
上游来源
https://github.com/github/awesome-copilot/tree/bbaa5872640e6cbae953beb22a71ae337398ca12/skills/pester-should-migration

适用范围

平台:linux、macos、windows;标签:测试与质量、Pester Should 断言迁移

安全提示

基础静态扫描不等于绝对安全。技能可能调用命令、浏览器、云服务或本地文件,请在最小权限环境中使用,高风险操作必须人工确认。

如发现侵权、许可证或安全问题,可在本页前台提交投诉,管理员复核后可立即下架。