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
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: