Skip to content

Commit

Permalink
Fix integ test
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju committed Jul 31, 2024
1 parent 7a8dfae commit 6281053
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 9 additions & 3 deletions tests/Integration/Syntax/v5/ShouldBeLike.v5.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,15 @@ Describe 'Should -BeLike' {
Should -BeLike 'Test*' 'mock should test correct value' 'TestValue'
}

It 'Should convert `Should ''Test*'' ''mock should test correct value'' ''TestValue'' -BeLike` correctly' {
Should 'Test*' 'mock should test correct value' 'TestValue' -BeLike
}
<#
This was not supported in Pester 5.6.1. There it gave the error message:
RuntimeException: Legacy Should syntax (without dashes) is not supported in Pester 5.Please refer to migration guide at: https://pester.dev/docs/migrations/v3-to-v4
ParameterBindingException: Cannot retrieve the dynamic parameters for the cmdlet. Legacy Should syntax (without dashes) is not supported in Pester 5. Please refer to migration guide at: https://pester.dev/docs/migrations/v3-to-v4
#>
# It 'Should convert `Should ''Test*'' ''mock should test correct value'' ''TestValue'' -BeLike` correctly' {
# Should 'Test*' 'mock should test correct value' 'TestValue' -BeLike
# }
}

Context 'When the tests are negated' {
Expand Down
12 changes: 9 additions & 3 deletions tests/Integration/Syntax/v5/ShouldBeLikeExactly.v5.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,15 @@ Describe 'Should -BeLikeExactly' {
Should -BeLikeExactly 'Test*' 'mock should test correct value' 'TestValue'
}

It 'Should convert `Should ''Test*'' ''mock should test correct value'' ''TestValue'' -BeLikeExactly` correctly' {
Should 'Test*' 'mock should test correct value' 'TestValue' -BeLikeExactly
}
<#
This was not supported in Pester 5.6.1. There it gave the error message:
RuntimeException: Legacy Should syntax (without dashes) is not supported in Pester 5.Please refer to migration guide at: https://pester.dev/docs/migrations/v3-to-v4
ParameterBindingException: Cannot retrieve the dynamic parameters for the cmdlet. Legacy Should syntax (without dashes) is not supported in Pester 5. Please refer to migration guide at: https://pester.dev/docs/migrations/v3-to-v4
#>
# It 'Should convert `Should ''Test*'' ''mock should test correct value'' ''TestValue'' -BeLikeExactly` correctly' {
# Should 'Test*' 'mock should test correct value' 'TestValue' -BeLikeExactly
# }
}

Context 'When the tests are negated' {
Expand Down

0 comments on commit 6281053

Please sign in to comment.