Skip to content

Fix #2722: Add missing Because parameter to Should-BeSlowerThan#2727

Merged
nohwnd merged 2 commits into
mainfrom
fix/2722-flaky-befasterthan
Jun 17, 2026
Merged

Fix #2722: Add missing Because parameter to Should-BeSlowerThan#2727
nohwnd merged 2 commits into
mainfrom
fix/2722-flaky-befasterthan

Conversation

@nohwnd

@nohwnd nohwnd commented Jun 17, 2026

Copy link
Copy Markdown
Member

Fixes #2722

Should-BeSlowerThan referenced \$Because in its error messages but never declared it as a parameter — it was always null. Added the missing [string] \$Because parameter.

Also changed the Should-BeFasterThan 'Has Because parameter' test to use a deterministic [timespan] instead of a scriptblock with Start-Sleep to avoid timing flakiness on CI. Added a corresponding Because test for Should-BeSlowerThan.

nohwnd and others added 2 commits June 17, 2026 15:23
…ix flaky test

Should-BeSlowerThan referenced $Because in error messages but never
declared it as a parameter, so it was always null.

Also changed the Should-BeFasterThan Because test to use a deterministic
[timespan] instead of a scriptblock with Start-Sleep to avoid timing
flakiness on CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nohwnd nohwnd enabled auto-merge (squash) June 17, 2026 13:59
@nohwnd nohwnd merged commit d42d374 into main Jun 17, 2026
13 checks passed
@nohwnd nohwnd deleted the fix/2722-flaky-befasterthan branch June 17, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should-BeFasterThan.Has Because parameter is flaky

1 participant