File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Requirements
2+
3+ Validate if you have ` Pester ` version 4.10.1 at least to run the tests
4+
5+ ```
6+ Get-Module Pester -ListAvailable
7+ ```
8+
9+ By default ` Powershell ` comes with 3.4.0 but we need at least 4.10.1 for some of our tests otherwise they will fail.
10+
11+
12+ ```
13+ Install-Module Pester -RequiredVersion 4.10.1
14+ ```
15+
16+ ------
17+
18+ # How to run tests
19+
20+ To execute tests, we need to use ` Invoke-Pester ` with the test file and the ` -PassThru ` option.
21+
22+ For example:
23+
24+ ```
25+ Invoke-Pester .\Install-OSServer.Tests.ps1 -PassThru
26+ ```
27+
28+ # Cleanup
29+
30+ You can remove the ` Pester ` module from the ` PowerShell ` by executing the following command:
31+
32+
33+ ```
34+ Uninstall-Module Pester -AllVersions
35+ ```
36+
37+ You may need to close the ` PowerShell ` that was executing the tests.
38+
39+ Note: This will leave 3.4.0 which is the default by ` PowerShell `
You can’t perform that action at this time.
0 commit comments