You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm trying to test a script with mandatory parameters. Despite supplying the parameter value, PowerShell still prompts to enter the value. I'm using Pester 5.3.3. What am I doing wrong?
invoke-pester Test*
Starting discovery in 1 files.
Discovery found 1 tests in 67ms.
Running tests.
cmdlet Test.ps1 at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
foo: world
[-] Test.Returns expected output 20ms (20ms|1ms)
Expected strings to be the same, but they were different.
Expected length: 19
Actual length: 13
Strings differ at index 0.
Expected: 'YOUR_EXPECTED_VALUE'
But was: 'Hello goodbye'
^
at ./Test.ps1 @Params | Should -Be "YOUR_EXPECTED_VALUE", D:\src\Scripts\Test.Tests.ps1:11
at <ScriptBlock>, D:\src\Scripts\Test.Tests.ps1:11
Tests completed in 3.42s
Tests Passed: 0, Failed: 1, Skipped: 0 NotRun: 0
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to test a script with mandatory parameters. Despite supplying the parameter value, PowerShell still prompts to enter the value. I'm using Pester 5.3.3. What am I doing wrong?
Test.ps1:
Test.Tests.ps1:
PowerShell output:
The text was updated successfully, but these errors were encountered: