Skip to content

Commit

Permalink
Fix tests with empty ForEach
Browse files Browse the repository at this point in the history
  • Loading branch information
fflaten committed Jul 9, 2024
1 parent c78caec commit a365340
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions tst/Format2.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ InPesterModuleScope {


Describe "Format-Collection2" {
It "Formats empty collection to @()" -TestCases @(
) {
It "Formats empty collection to @()" {
Format-Collection2 -Value @() | Verify-Equal "@()"
}

Expand Down
3 changes: 1 addition & 2 deletions tst/functions/assert/Time/Should-BeAfter.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ Describe "Should-BeAfter" {
{ [DateTime]::Now.Add([timespan]::FromMinutes(-1)) | Should-BeAfter } | Verify-AssertionFailed
}

It "Throws when both -Ago and -FromNow are used" -ForEach @(
) {
It "Throws when both -Ago and -FromNow are used" {
{ $Actual | Should-BeAfter 10minutes -Ago -FromNow } | Verify-Throw
}

Expand Down
3 changes: 1 addition & 2 deletions tst/functions/assert/Time/Should-BeBefore.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ Describe "Should-BeBefore" {
{ [DateTime]::Now.Add([timespan]::FromMinutes(20)) | Should-BeBefore } | Verify-AssertionFailed
}

It "Throws when both -Ago and -FromNow are used" -ForEach @(
) {
It "Throws when both -Ago and -FromNow are used" {
{ $Actual | Should-BeBefore 10minutes -Ago -FromNow } | Verify-Throw
}

Expand Down

0 comments on commit a365340

Please sign in to comment.