Learn how to test your PowerShell exercises on Exercism
The exercises all use the Pester framework for mocking and testing.
All tests will be in a file named
[Exercise].tests.ps1 as is the standard for the Pester framework.
If you're in the right directory (i.e. the one containing
You can run the tests from PowerShell by calling:
This will run all
.tests.ps1 files it can find in the directory.
If you are using another shell than PowerShell, you can run the tests by calling:
pwsh -Command "Invoke-Pester"
You have to make sure you have the powershell extension installed in Visual Studio Code .
You can run tests in visual studio code in a couple of ways:
.Tests.ps1script from the Debug menu. Keyboard short cuts are:
Shift + F5
Describekeyword in the test code itself