Commit d42d374
* Fix #2722: Add missing Because parameter to Should-BeSlowerThan and fix 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>
* Verify Because message appears in assertion error
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 789acc0 commit d42d374
3 files changed
Lines changed: 12 additions & 3 deletions
File tree
- src/functions/assert/Time
- tst/functions/assert/Time
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
27 | 34 | | |
0 commit comments