Print mock history #2673
+28
−8
Draft
Print mock history #2673
Azure Pipelines / Pester PR
cancelled
Jan 23, 2026 in 8m 52s
Build #20260123.1 had test failures
Details
- Failed: 85 (0.78%)
- Passed: 10,643 (97.44%)
- Other: 195 (1.79%)
- Total: 10,923
Annotations
azure-pipelines / Pester PR
When Calling Should -Invoke 0 without exactly.Should throw if mock was called
Expected strings to be the same, but they were different.
Expected length: 79
Actual length: 156
Strings differ at index 79.
Expected: '...alled 0 times exactly, but was called 1 times'
But was: '...alled 0 times exactly, but was called 1 times\nPerformed ...'
------------------------------------------------^
Raw output
at $result.Exception.Message | Should -Be 'Expected FunctionUnderTest to be called 0 times exactly, but was called 1 times', /home/vsts/work/1/s/tst/functions/Mock.Tests.ps1:802
azure-pipelines / Pester PR
When Calling Should -Invoke 0 without exactly.Should include reason when -Because is used
Expected strings to be the same, but they were different.
Expected length: 99
Actual length: 176
Strings differ at index 99.
Expected: '...y, because of reasons, but was called 1 times'
But was: '...y, because of reasons, but was called 1 times\nPerformed ...'
------------------------------------------------^
Raw output
at $failure.Exception.Message | Should -Be 'Expected FunctionUnderTest to be called 0 times exactly, because of reasons, but was called 1 times', /home/vsts/work/1/s/tst/functions/Mock.Tests.ps1:816
azure-pipelines / Pester PR
When Calling Should -Not -Invoke without exactly.Should throw if mock was called once
Expected strings to be the same, but they were different.
Expected length: 71
Actual length: 148
Strings differ at index 71.
Expected: '... not to be called exactly 1 times, but it was'
But was: '... not to be called exactly 1 times, but it was\nPerformed ...'
------------------------------------------------^
Raw output
at $result.Exception.Message | Should -Be "Expected FunctionUnderTest not to be called exactly 1 times, but it was", /home/vsts/work/1/s/tst/functions/Mock.Tests.ps1:834
azure-pipelines / Pester PR
When Calling Should -Not -Invoke [Times] without exactly.Should include reason when -Because is used
Expected strings to be the same, but they were different.
Expected length: 101
Actual length: 191
Strings differ at index 101.
Expected: '...s, because of reasons, but was called 2 times'
But was: '...s, because of reasons, but was called 2 times\nPerformed ...'
------------------------------------------------^
Raw output
at $failure.Exception.Message | Should -Be 'Expected FunctionUnderTest to be called less than 1 times, because of reasons, but was called 2 times', /home/vsts/work/1/s/tst/functions/Mock.Tests.ps1:889
Loading