Closed KyleRemil closed 5 months ago
Thanks for trying out Pester.
The docs at https://pester.dev are written for the latest version which currently is 5.5.0. You may also select v4 docs using the dropdown next to the Pester-logo in the top left.
Pester v3 is unsupported so the only docs available atm. are the included PowerShell command help and about_* files which you can read with ex. Get-Help about_Pester
I'd recommend that you upgrade to the latest v5 version using Install-Module Pester -Force -SkipPublisherCheck
for new projects. For existing projects, see our migration guides:
Checklist
Link to page
https://pester.dev/docs/quick-start
What is the issue?
I copy pasted the code into a document named Get-Planet.Tests.ps1 and got syntax errors.
I first removed 'BeforeAll' then I got the '-Be' exception. Either I don't understand the directions or the syntax is incorrect for the version I am running.
My PC: Windows 10 22H2 Pester 3.4.0 PowerShell 5.1.19041.3570
Suggested fix?
Update example code to:
Run in terminal with: Invoke-Pester "C:\MyFolder\Get-Planet.Tests.ps1"