Skip to content

Update assertion-map.md for Should-Not-Throw syntax#2248

Merged
aaronpowell merged 1 commit into
github:mainfrom
nohwnd:patch-2
Jul 8, 2026
Merged

Update assertion-map.md for Should-Not-Throw syntax#2248
aaronpowell merged 1 commit into
github:mainfrom
nohwnd:patch-2

Conversation

@nohwnd

@nohwnd nohwnd commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have read and followed the Guidance for submissions involving paid services.
  • My contribution adds a new instruction, prompt, agent, skill, workflow, or canvas extension file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, workflow, or canvas extension with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.
  • I am targeting the main branch for this pull request.

Description

Fixing the invocation of the code when Should -Not -Throw is replaced with just scriptblock, to make sure the replacement scriptblock executes rather then just outputs its content.

Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • New canvas extension.
  • Update to existing instruction, prompt, agent, plugin, skill, workflow, or canvas extension.
  • Other (please specify):

Additional Notes


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

@nohwnd nohwnd requested a review from aaronpowell as a code owner July 8, 2026 19:49
Copilot AI review requested due to automatic review settings July 8, 2026 19:49
@github-actions github-actions Bot added the skills PR touches skills label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🔴 Contributor Reputation Check: HIGH risk

Check Risk
Profile HIGH
Credential audit LOW

Maintainers: please review this contributor before merging.
See the workflow run for full details.
Automated check powered by AGT.

@github-actions github-actions Bot added the needs-review:HIGH Contributor reputation check flagged HIGH risk label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🔒 PR Risk Scan Results

Scanned 1 changed file(s).

Severity Count
🔴 High 0
🟠 Medium 0
ℹ️ Info 0

✅ No matching risk patterns were detected in changed files.

This is an automated soft-gate report. Findings indicate review targets and do not block merge by themselves.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the Pester Should migration reference map to clarify how to handle Should -Not -Throw cases when migrating, ensuring the script block is invoked (not just emitted) in the suggested replacement.

Changes:

  • Adjusted the Should -Not -Throw mapping to show invoking the script block (& { ... }) when no “no-throw” assertion exists in v6.

| `{ ... } \| Should -Throw -ErrorId 'X'` | `{ ... } \| Should-Throw -FullyQualifiedErrorId 'X'` | Param **renamed**. |
| `{ ... } \| Should -Throw -ExceptionType ([T])` | `{ ... } \| Should-Throw -ExceptionType ([T])` | Same. |
| `{ ... } \| Should -Not -Throw` | `{ ... }; <no throw assertion needed>` | There is no `Should-NotThrow`; a script block that must not throw simply runs. Assert on its result instead, or keep the classic `Should -Not -Throw`. |
| `{ ... } \| Should -Not -Throw` | `& { ... }; <no throw assertion needed>` | There is no `Should-NotThrow`; a script block that must not throw simply runs. Assert on its result instead, or keep the classic `Should -Not -Throw`. |
@aaronpowell aaronpowell merged commit fb29225 into github:main Jul 8, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review:HIGH Contributor reputation check flagged HIGH risk skills PR touches skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants