Skip to content

Commit

Permalink
WIP tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fflaten committed Jul 14, 2024
1 parent c101907 commit 31f34bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tst/functions/Mock.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2823,6 +2823,7 @@ Describe 'Calls not matching ParameterFilter' {
}

It 'Calls real function when at least one parameterized mock has -AllowFallback' {
# TODO: Is this expected? Or should all parameterized mocks allow fallback?
Mock demo -ParameterFilter { $name -eq 'world' } -MockWith { 'mocked' } -AllowFallback
Mock demo -ParameterFilter { $name -eq 'Wisconsin' } -MockWith { 'mocked2' }
demo -name 'you' | Should -Be 'hello you'
Expand Down Expand Up @@ -2862,7 +2863,8 @@ Describe 'Calls not matching ParameterFilter' {
demo -name 'you' | Should -Be 'hello you'
}

It 'Throws when a more local parameterized mock does not allow fallback' {
It 'Throws when a more local parameterized mock does not allow fallback' -Skip {
# TODO:Do we expect this? If so, we need to expose mock scope depth from Get-AllMockBehaviors
Mock demo -ParameterFilter { $name -eq 'world' } -MockWith { 'mocked' }
{ demo -name 'you' } | Should -Throw
}
Expand Down

0 comments on commit 31f34bf

Please sign in to comment.