From 358dda9ee6686526c7a6376d481d1f04c5d70d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Sun, 23 Jun 2024 15:28:26 +0200 Subject: [PATCH] Do not output value from assertion --- src/functions/assert/Boolean/Should-BeFalse.ps1 | 2 -- src/functions/assert/Boolean/Should-BeFalsy.ps1 | 2 -- src/functions/assert/Boolean/Should-BeTrue.ps1 | 2 -- src/functions/assert/Boolean/Should-BeTruthy.ps1 | 2 -- src/functions/assert/Collection/Should-All.ps1 | 2 -- src/functions/assert/Collection/Should-Any.ps1 | 2 -- src/functions/assert/Collection/Should-BeCollection.ps1 | 2 -- .../assert/Collection/Should-ContainCollection.ps1 | 2 -- .../assert/Collection/Should-NotContainCollection.ps1 | 2 -- src/functions/assert/General/Should-Be.ps1 | 2 -- src/functions/assert/General/Should-BeGreaterThan.ps1 | 2 -- .../assert/General/Should-BeGreaterThanOrEqual.ps1 | 2 -- src/functions/assert/General/Should-BeLessThan.ps1 | 2 -- .../assert/General/Should-BeLessThanOrEqual.ps1 | 2 -- src/functions/assert/General/Should-BeNull.ps1 | 2 -- src/functions/assert/General/Should-BeSame.ps1 | 2 -- src/functions/assert/General/Should-HaveType.ps1 | 2 -- src/functions/assert/General/Should-NotBe.ps1 | 2 -- src/functions/assert/General/Should-NotBeNull.ps1 | 2 -- src/functions/assert/General/Should-NotBeSame.ps1 | 2 -- src/functions/assert/General/Should-NotHaveType.ps1 | 2 -- tst/functions/assert/Boolean/Should-BeFalse.Tests.ps1 | 5 ----- tst/functions/assert/Boolean/Should-BeFalsy.Tests.ps1 | 5 ----- tst/functions/assert/Boolean/Should-BeTrue.Tests.ps1 | 5 ----- tst/functions/assert/Boolean/Should-BeTruthy.Tests.ps1 | 5 ----- tst/functions/assert/Collection/Should-All.Tests.ps1 | 7 ------- tst/functions/assert/Collection/Should-Any.Tests.ps1 | 7 ------- tst/functions/assert/General/Should-Be.Tests.ps1 | 5 ----- .../assert/General/Should-BeGreaterThan.Tests.ps1 | 5 ----- .../assert/General/Should-BeGreaterThanOrEqual.Tests.ps1 | 5 ----- tst/functions/assert/General/Should-BeLessThan.Tests.ps1 | 9 --------- .../assert/General/Should-BeLessThanOrEqual.Tests.ps1 | 5 ----- tst/functions/assert/General/Should-BeSame.Tests.ps1 | 5 ----- tst/functions/assert/General/Should-HaveType.Tests.ps1 | 4 ---- tst/functions/assert/General/Should-NotBe.Tests.ps1 | 5 ----- tst/functions/assert/General/Should-NotBeNull.Tests.ps1 | 4 ---- tst/functions/assert/General/Should-NotBeSame.Tests.ps1 | 5 ----- .../assert/General/Should-NotHaveType.Tests.ps1 | 4 ---- 38 files changed, 132 deletions(-) diff --git a/src/functions/assert/Boolean/Should-BeFalse.ps1 b/src/functions/assert/Boolean/Should-BeFalse.ps1 index af92842db..a6a4870eb 100644 --- a/src/functions/assert/Boolean/Should-BeFalse.ps1 +++ b/src/functions/assert/Boolean/Should-BeFalse.ps1 @@ -50,6 +50,4 @@ $Message = Get-AssertionMessage -Expected $false -Actual $Actual -Because $Because -DefaultMessage "Expected , but got: ." throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/Boolean/Should-BeFalsy.ps1 b/src/functions/assert/Boolean/Should-BeFalsy.ps1 index c7148077f..be49d4860 100644 --- a/src/functions/assert/Boolean/Should-BeFalsy.ps1 +++ b/src/functions/assert/Boolean/Should-BeFalsy.ps1 @@ -50,6 +50,4 @@ $Message = Get-AssertionMessage -Expected $false -Actual $Actual -Because $Because -DefaultMessage 'Expected or a falsy value: 0, "", $null or @(), but got: .' throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/Boolean/Should-BeTrue.ps1 b/src/functions/assert/Boolean/Should-BeTrue.ps1 index c268d6e90..caf1e5209 100644 --- a/src/functions/assert/Boolean/Should-BeTrue.ps1 +++ b/src/functions/assert/Boolean/Should-BeTrue.ps1 @@ -50,6 +50,4 @@ $Message = Get-AssertionMessage -Expected $true -Actual $Actual -Because $Because -DefaultMessage "Expected , but got: ." throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/Boolean/Should-BeTruthy.ps1 b/src/functions/assert/Boolean/Should-BeTruthy.ps1 index 323a1bd39..aa4549e50 100644 --- a/src/functions/assert/Boolean/Should-BeTruthy.ps1 +++ b/src/functions/assert/Boolean/Should-BeTruthy.ps1 @@ -51,6 +51,4 @@ $Message = Get-AssertionMessage -Expected $true -Actual $Actual -Because $Because -DefaultMessage "Expected or a truthy value, but got: ." throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/Collection/Should-All.ps1 b/src/functions/assert/Collection/Should-All.ps1 index df9220396..87b4661bc 100644 --- a/src/functions/assert/Collection/Should-All.ps1 +++ b/src/functions/assert/Collection/Should-All.ps1 @@ -99,6 +99,4 @@ } throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/Collection/Should-Any.ps1 b/src/functions/assert/Collection/Should-Any.ps1 index b2625068d..6aab975a4 100644 --- a/src/functions/assert/Collection/Should-Any.ps1 +++ b/src/functions/assert/Collection/Should-Any.ps1 @@ -88,6 +88,4 @@ } throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/Collection/Should-BeCollection.ps1 b/src/functions/assert/Collection/Should-BeCollection.ps1 index 1df9a3e05..c6643dcce 100644 --- a/src/functions/assert/Collection/Should-BeCollection.ps1 +++ b/src/functions/assert/Collection/Should-BeCollection.ps1 @@ -111,7 +111,5 @@ $Message = Get-AssertionMessage -Expected $Expected -Actual $Actual -Because $Because -Data @{ expectedDifference = $expectedDifference; actualDifference = $actualDifference } -DefaultMessage "Expected to be present in in any order, but some values were not.`nMissing in actual: `nExtra in actual: " throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } } diff --git a/src/functions/assert/Collection/Should-ContainCollection.ps1 b/src/functions/assert/Collection/Should-ContainCollection.ps1 index 685beb253..3faf1398b 100644 --- a/src/functions/assert/Collection/Should-ContainCollection.ps1 +++ b/src/functions/assert/Collection/Should-ContainCollection.ps1 @@ -51,6 +51,4 @@ $Message = Get-AssertionMessage -Expected $Expected -Actual $Actual -Because $Because -DefaultMessage "Expected to be present in , but it was not there." throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/Collection/Should-NotContainCollection.ps1 b/src/functions/assert/Collection/Should-NotContainCollection.ps1 index 78ab32a30..37b2e1f37 100644 --- a/src/functions/assert/Collection/Should-NotContainCollection.ps1 +++ b/src/functions/assert/Collection/Should-NotContainCollection.ps1 @@ -51,6 +51,4 @@ $Message = Get-AssertionMessage -Expected $Expected -Actual $Actual -Because $Because -DefaultMessage "Expected to not be present in collection , but it was there." throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/General/Should-Be.ps1 b/src/functions/assert/General/Should-Be.ps1 index 35f7350d3..a06e3aafb 100644 --- a/src/functions/assert/General/Should-Be.ps1 +++ b/src/functions/assert/General/Should-Be.ps1 @@ -44,6 +44,4 @@ $Message = Get-AssertionMessage -Expected $Expected -Actual $Actual -Because $Because -DefaultMessage "Expected , but got ." throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/General/Should-BeGreaterThan.ps1 b/src/functions/assert/General/Should-BeGreaterThan.ps1 index 3e355025c..770e55b1d 100644 --- a/src/functions/assert/General/Should-BeGreaterThan.ps1 +++ b/src/functions/assert/General/Should-BeGreaterThan.ps1 @@ -42,6 +42,4 @@ $Message = Get-AssertionMessage -Expected $Expected -Actual $Actual -Because $Because -DefaultMessage "Expected the actual value to be greater than , but it was not. Actual: " throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/General/Should-BeGreaterThanOrEqual.ps1 b/src/functions/assert/General/Should-BeGreaterThanOrEqual.ps1 index 118bc17ed..99fb99e5f 100644 --- a/src/functions/assert/General/Should-BeGreaterThanOrEqual.ps1 +++ b/src/functions/assert/General/Should-BeGreaterThanOrEqual.ps1 @@ -42,6 +42,4 @@ $Message = Get-AssertionMessage -Expected $Expected -Actual $Actual -Because $Because -DefaultMessage "Expected the actual value to be greater than or equal to , but it was not. Actual: " throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/General/Should-BeLessThan.ps1 b/src/functions/assert/General/Should-BeLessThan.ps1 index add3b16b1..884eb6031 100644 --- a/src/functions/assert/General/Should-BeLessThan.ps1 +++ b/src/functions/assert/General/Should-BeLessThan.ps1 @@ -42,6 +42,4 @@ $Message = Get-AssertionMessage -Expected $Expected -Actual $Actual -Because $Because -DefaultMessage "Expected the actual value to be less than , but it was not. Actual: " throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/General/Should-BeLessThanOrEqual.ps1 b/src/functions/assert/General/Should-BeLessThanOrEqual.ps1 index 5182f24fb..f89d0b1a5 100644 --- a/src/functions/assert/General/Should-BeLessThanOrEqual.ps1 +++ b/src/functions/assert/General/Should-BeLessThanOrEqual.ps1 @@ -51,6 +51,4 @@ $Message = Get-AssertionMessage -Expected $Expected -Actual $Actual -Because $Because -DefaultMessage "Expected the actual value to be less than or equal to , but it was not. Actual: " throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/General/Should-BeNull.ps1 b/src/functions/assert/General/Should-BeNull.ps1 index c6dd5342e..fd7fd2b2f 100644 --- a/src/functions/assert/General/Should-BeNull.ps1 +++ b/src/functions/assert/General/Should-BeNull.ps1 @@ -36,6 +36,4 @@ $Message = Get-AssertionMessage -Expected $null -Actual $Actual -Because $Because -DefaultMessage "Expected `$null, but got ''." throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/General/Should-BeSame.ps1 b/src/functions/assert/General/Should-BeSame.ps1 index c3cbdd8b0..fbd6d0beb 100644 --- a/src/functions/assert/General/Should-BeSame.ps1 +++ b/src/functions/assert/General/Should-BeSame.ps1 @@ -57,6 +57,4 @@ $Message = Get-AssertionMessage -Expected $Expected -Actual $Actual -Because $Because -DefaultMessage "Expected , to be the same instance but it was not. Actual: " throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/General/Should-HaveType.ps1 b/src/functions/assert/General/Should-HaveType.ps1 index 097533c04..45dbcd0ec 100644 --- a/src/functions/assert/General/Should-HaveType.ps1 +++ b/src/functions/assert/General/Should-HaveType.ps1 @@ -42,6 +42,4 @@ $Message = Get-AssertionMessage -Expected $Expected -Actual $Actual -Because $Because -DefaultMessage "Expected value to have type , but got ." throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/General/Should-NotBe.ps1 b/src/functions/assert/General/Should-NotBe.ps1 index 386a04995..1900b386e 100644 --- a/src/functions/assert/General/Should-NotBe.ps1 +++ b/src/functions/assert/General/Should-NotBe.ps1 @@ -43,6 +43,4 @@ $Message = Get-AssertionMessage -Expected $Expected -Actual $Actual -Because $Because -DefaultMessage "Expected , to be different than the actual value, but they were equal." throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/General/Should-NotBeNull.ps1 b/src/functions/assert/General/Should-NotBeNull.ps1 index 3d6cad334..2d7b117db 100644 --- a/src/functions/assert/General/Should-NotBeNull.ps1 +++ b/src/functions/assert/General/Should-NotBeNull.ps1 @@ -36,6 +36,4 @@ $Message = Get-AssertionMessage -Expected $null -Actual $Actual -Because $Because -DefaultMessage "Expected not `$null, but got `$null." throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/General/Should-NotBeSame.ps1 b/src/functions/assert/General/Should-NotBeSame.ps1 index 9798fd0d3..e27517e9f 100644 --- a/src/functions/assert/General/Should-NotBeSame.ps1 +++ b/src/functions/assert/General/Should-NotBeSame.ps1 @@ -51,6 +51,4 @@ $Message = Get-AssertionMessage -Expected $Expected -Actual $Actual -Because $Because -DefaultMessage "Expected , to not be the same instance, but they were the same instance." throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/src/functions/assert/General/Should-NotHaveType.ps1 b/src/functions/assert/General/Should-NotHaveType.ps1 index 2a0033496..cfac332f8 100644 --- a/src/functions/assert/General/Should-NotHaveType.ps1 +++ b/src/functions/assert/General/Should-NotHaveType.ps1 @@ -44,6 +44,4 @@ $Message = Get-AssertionMessage -Expected $Expected -Actual $Actual -Because $Because -DefaultMessage "Expected value to be of different type than , but got ." throw [Pester.Factory]::CreateShouldErrorRecord($Message, $MyInvocation.ScriptName, $MyInvocation.ScriptLineNumber, $MyInvocation.Line.TrimEnd([System.Environment]::NewLine), $true) } - - $Actual } diff --git a/tst/functions/assert/Boolean/Should-BeFalse.Tests.ps1 b/tst/functions/assert/Boolean/Should-BeFalse.Tests.ps1 index cb0f5b1c8..97fd1a9ce 100644 --- a/tst/functions/assert/Boolean/Should-BeFalse.Tests.ps1 +++ b/tst/functions/assert/Boolean/Should-BeFalse.Tests.ps1 @@ -28,11 +28,6 @@ Describe "Should-BeFalse" { } } - It "Returns the value on output" { - $expected = $false - $expected | Should-BeFalse | Verify-Equal $expected - } - It "Can be called with positional parameters" { { Should-BeFalse $true } | Verify-AssertionFailed } diff --git a/tst/functions/assert/Boolean/Should-BeFalsy.Tests.ps1 b/tst/functions/assert/Boolean/Should-BeFalsy.Tests.ps1 index 01f30533b..33cd0d2ed 100644 --- a/tst/functions/assert/Boolean/Should-BeFalsy.Tests.ps1 +++ b/tst/functions/assert/Boolean/Should-BeFalsy.Tests.ps1 @@ -29,11 +29,6 @@ Describe "Should-BeFalsy" { } } - It "Returns the value on output" { - $expected = $false - $expected | Should-BeFalsy | Verify-Equal $expected - } - It "Can be called with positional parameters" { { Should-BeFalsy $true } | Verify-AssertionFailed } diff --git a/tst/functions/assert/Boolean/Should-BeTrue.Tests.ps1 b/tst/functions/assert/Boolean/Should-BeTrue.Tests.ps1 index 3852bb318..f9b290c79 100644 --- a/tst/functions/assert/Boolean/Should-BeTrue.Tests.ps1 +++ b/tst/functions/assert/Boolean/Should-BeTrue.Tests.ps1 @@ -25,11 +25,6 @@ Describe "Should-BeTrue" { } } - It "Returns the value on output" { - $expected = $true - $expected | Should-BeTrue | Verify-Equal $expected - } - It "Can be called with positional parameters" { { Should-BeTrue $false } | Verify-AssertionFailed } diff --git a/tst/functions/assert/Boolean/Should-BeTruthy.Tests.ps1 b/tst/functions/assert/Boolean/Should-BeTruthy.Tests.ps1 index 446cf4fe2..2834d25f9 100644 --- a/tst/functions/assert/Boolean/Should-BeTruthy.Tests.ps1 +++ b/tst/functions/assert/Boolean/Should-BeTruthy.Tests.ps1 @@ -24,11 +24,6 @@ Describe "Should-BeTruthy" { } } - It "Returns the value on output" { - $expected = $true - $expected | Should-BeTruthy | Verify-Equal $expected - } - It "Can be called with positional parameters" { { Should-BeTruthy $false } | Verify-AssertionFailed } diff --git a/tst/functions/assert/Collection/Should-All.Tests.ps1 b/tst/functions/assert/Collection/Should-All.Tests.ps1 index 850eb4ae1..b02c7efca 100644 --- a/tst/functions/assert/Collection/Should-All.Tests.ps1 +++ b/tst/functions/assert/Collection/Should-All.Tests.ps1 @@ -45,13 +45,6 @@ Expected [int] 2, but got [int] 1." -replace "`r`n", "`n") $err.Exception.Message | Verify-Equal $Message } - It "Returns the value on output" { - $expected = "a", "b" - $v = $expected | Should-All { $true } - $v[0] | Verify-Equal $expected[0] - $v[1] | Verify-Equal $expected[1] - } - It "Can filter using variables from the sorrounding context" { $f = 1 2, 4 | Should-All { $_ / $f } diff --git a/tst/functions/assert/Collection/Should-Any.Tests.ps1 b/tst/functions/assert/Collection/Should-Any.Tests.ps1 index 52548b8a2..4b18301e0 100644 --- a/tst/functions/assert/Collection/Should-Any.Tests.ps1 +++ b/tst/functions/assert/Collection/Should-Any.Tests.ps1 @@ -52,13 +52,6 @@ Expected [int] 2, but got [int] 1." -replace "`r`n", "`n") $err.Exception.Message | Verify-Equal $Message } - It "Returns the value on output" { - $expected = "a", "b" - $v = $expected | Should-Any { $true } - $v[0] | Verify-Equal $expected[0] - $v[1] | Verify-Equal $expected[1] - } - It "Accepts FilterScript and Actual by position" { Should-Any { $true } 1, 2 } diff --git a/tst/functions/assert/General/Should-Be.Tests.ps1 b/tst/functions/assert/General/Should-Be.Tests.ps1 index 7213dc8c0..e1147db4e 100644 --- a/tst/functions/assert/General/Should-Be.Tests.ps1 +++ b/tst/functions/assert/General/Should-Be.Tests.ps1 @@ -69,11 +69,6 @@ Describe "Should-Be" { } } - It "Returns the value on output" { - $expected = 1 - $expected | Should-Be 1 | Verify-Equal $expected - } - It "Can be called with positional parameters" { { Should-Be 1 2 } | Verify-AssertionFailed } diff --git a/tst/functions/assert/General/Should-BeGreaterThan.Tests.ps1 b/tst/functions/assert/General/Should-BeGreaterThan.Tests.ps1 index f260644fe..748442a89 100644 --- a/tst/functions/assert/General/Should-BeGreaterThan.Tests.ps1 +++ b/tst/functions/assert/General/Should-BeGreaterThan.Tests.ps1 @@ -87,11 +87,6 @@ Describe "Should-BeGreaterThan" { } } - It "Returns the value on output" { - $expected = 1 - $expected | Should-BeGreaterThan 0 | Verify-Equal $expected - } - It "Can be called with positional parameters" { { Should-BeGreaterThan 2 1 } | Verify-AssertionFailed } diff --git a/tst/functions/assert/General/Should-BeGreaterThanOrEqual.Tests.ps1 b/tst/functions/assert/General/Should-BeGreaterThanOrEqual.Tests.ps1 index 6868c0dbd..5096a63da 100644 --- a/tst/functions/assert/General/Should-BeGreaterThanOrEqual.Tests.ps1 +++ b/tst/functions/assert/General/Should-BeGreaterThanOrEqual.Tests.ps1 @@ -87,11 +87,6 @@ Describe "Should-BeGreaterThanOrEqual" { } } - It "Returns the value on output" { - $expected = 1 - $expected | Should-BeGreaterThanOrEqual 0 | Verify-Equal $expected - } - It "Can be called with positional parameters" { { Should-BeGreaterThanOrEqual 2 1 } | Verify-AssertionFailed } diff --git a/tst/functions/assert/General/Should-BeLessThan.Tests.ps1 b/tst/functions/assert/General/Should-BeLessThan.Tests.ps1 index 382ba0d6a..44517fd73 100644 --- a/tst/functions/assert/General/Should-BeLessThan.Tests.ps1 +++ b/tst/functions/assert/General/Should-BeLessThan.Tests.ps1 @@ -87,15 +87,6 @@ Describe "Should-BeLessThan" { } } - It "Returns the value on output" { - $expected = 0 - $expected | Should-BeLessThan 1 | Verify-Equal $expected - } - - It "Can be called with positional parameters" { - { Should-BeLessThan 1 2 } | Verify-AssertionFailed - } - It "Given collection to Expected it throws" { $err = { "dummy" | Should-BeLessThan @() } | Verify-Throw $err.Exception | Verify-Type ([ArgumentException]) diff --git a/tst/functions/assert/General/Should-BeLessThanOrEqual.Tests.ps1 b/tst/functions/assert/General/Should-BeLessThanOrEqual.Tests.ps1 index 754eb2ced..92501fa24 100644 --- a/tst/functions/assert/General/Should-BeLessThanOrEqual.Tests.ps1 +++ b/tst/functions/assert/General/Should-BeLessThanOrEqual.Tests.ps1 @@ -87,11 +87,6 @@ Describe "Should-BeLessThanOrEqual" { } } - It "Returns the value on output" { - $expected = 0 - $expected | Should-BeLessThanOrEqual 1 | Verify-Equal $expected - } - It "Can be called with positional parameters" { { Should-BeLessThanOrEqual 1 2 } | Verify-AssertionFailed } diff --git a/tst/functions/assert/General/Should-BeSame.Tests.ps1 b/tst/functions/assert/General/Should-BeSame.Tests.ps1 index a49a342ab..b691a9b6f 100644 --- a/tst/functions/assert/General/Should-BeSame.Tests.ps1 +++ b/tst/functions/assert/General/Should-BeSame.Tests.ps1 @@ -24,11 +24,6 @@ Describe "Should-BeSame" { $err.Exception.Message | Verify-Equal $Message } - It "Returns the value on output" { - $expected = New-Object Diagnostics.Process - $expected | Should-BeSame $expected | Verify-Equal $expected - } - Context "Throws when `$expected is a value type or string to warn user about unexpected behavior" { It "throws for value " -TestCases @( @{ Value = 1 } diff --git a/tst/functions/assert/General/Should-HaveType.Tests.ps1 b/tst/functions/assert/General/Should-HaveType.Tests.ps1 index ba064cb3d..c4d66ec01 100644 --- a/tst/functions/assert/General/Should-HaveType.Tests.ps1 +++ b/tst/functions/assert/General/Should-HaveType.Tests.ps1 @@ -9,10 +9,6 @@ Describe "Should-HaveType" { { 1 | Should-HaveType ([string]) } | Verify-AssertionFailed } - It "Returns the given value" { - 'b' | Should-HaveType ([string]) | Verify-Equal 'b' - } - It "Can be called with positional parameters" { { Should-HaveType ([string]) 1 } | Verify-AssertionFailed } diff --git a/tst/functions/assert/General/Should-NotBe.Tests.ps1 b/tst/functions/assert/General/Should-NotBe.Tests.ps1 index c03f28826..a2bcb99a0 100644 --- a/tst/functions/assert/General/Should-NotBe.Tests.ps1 +++ b/tst/functions/assert/General/Should-NotBe.Tests.ps1 @@ -68,11 +68,6 @@ Describe "Should-NotBe" { } } - It "Returns the value on output" { - $expected = 1 - $expected | Should-NotBe 9 | Verify-Equal $expected - } - It "Can be called with positional parameters" { { Should-NotBe 1 1 } | Verify-AssertionFailed } diff --git a/tst/functions/assert/General/Should-NotBeNull.Tests.ps1 b/tst/functions/assert/General/Should-NotBeNull.Tests.ps1 index 203dd44b1..dc67409d5 100644 --- a/tst/functions/assert/General/Should-NotBeNull.Tests.ps1 +++ b/tst/functions/assert/General/Should-NotBeNull.Tests.ps1 @@ -10,10 +10,6 @@ InPesterModuleScope { { $null | Should-NotBeNull } | Verify-AssertionFailed } - It "Returns the given value" { - 1 | Should-NotBeNull | Verify-NotNull - } - It "Can be called with positional parameters" { { Should-NotBeNull $null } | Verify-AssertionFailed } diff --git a/tst/functions/assert/General/Should-NotBeSame.Tests.ps1 b/tst/functions/assert/General/Should-NotBeSame.Tests.ps1 index 4310c614d..360013546 100644 --- a/tst/functions/assert/General/Should-NotBeSame.Tests.ps1 +++ b/tst/functions/assert/General/Should-NotBeSame.Tests.ps1 @@ -24,11 +24,6 @@ Describe "Should-NotBeSame" { $err.Exception.Message | Verify-Equal $Message } - It "Returns the value on output" { - $expected = 1 - $expected | Should-NotBeSame 7 | Verify-Equal $expected - } - It "Can be called with positional parameters" { { $obj = New-Object -TypeName PSObject diff --git a/tst/functions/assert/General/Should-NotHaveType.Tests.ps1 b/tst/functions/assert/General/Should-NotHaveType.Tests.ps1 index 00b598dd0..176473794 100644 --- a/tst/functions/assert/General/Should-NotHaveType.Tests.ps1 +++ b/tst/functions/assert/General/Should-NotHaveType.Tests.ps1 @@ -9,10 +9,6 @@ Describe "Should-NotHaveType" { 1 | Should-NotHaveType ([string]) } - It "Returns the given value" { - 'b' | Should-NotHaveType ([int]) | Verify-Equal 'b' - } - It "Can be called with positional parameters" { { Should-NotHaveType ([int]) 1 } | Verify-AssertionFailed }