Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tutorial/1-introduction/2-prerequisites.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ Import-Module Pester -PassThru
```

```
ModuleType Version PreRelease Name
---------- ------- ---------- ----
Script 6.0.0 Pester
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 6.1.0 Pester {Add-ShouldOperator, …}
```

If the version shown starts with a `6`, you are ready.
If the version shown starts with a `6`, you are ready. A narrow terminal prints the same information as a list instead of a table, that is PowerShell formatting rather than anything being wrong.

:::warning An old Pester can be loaded without you asking
PowerShell loads a module automatically the first time you call one of its commands, and it picks the highest version it can find — but if an older Pester is *already* loaded in your session, it stays loaded. If the version above is not what you expect, open a fresh PowerShell session and check again before doing anything else.
Expand Down
4 changes: 2 additions & 2 deletions tutorial/2-testing-a-module/1-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ Import-Module ./Planetarium/Planetarium.psd1 -Force -PassThru
```
Export-ModuleMember: Cannot bind parameter 'Function' to the target. Exception setting "Function": "Cannot process argument because the value of argument "pattern" is null. Change the value of argument "pattern" to a non-null value."

ModuleType Version PreRelease Name
---------- ------- ---------- ----
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 0.1.0 Planetarium
```

Expand Down
2 changes: 1 addition & 1 deletion tutorial/2-testing-a-module/2-first-test.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Invoke-Pester -Path ./Planetarium/Public

```
Running tests from 1 files.
[+] /home/you/pester-tutorial/Planetarium/Public/Get-Planet.Tests.ps1 305ms
[+] /home/you/pester-tutorial/Planetarium/Public/Get-Planet.Tests.ps1 305ms (1 test)
Tests completed in 313ms
Tests Passed: 1, Failed: 0, Skipped: 0, Inconclusive: 0, NotRun: 0
```
Expand Down
14 changes: 7 additions & 7 deletions tutorial/2-testing-a-module/5-output.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The full list is in [Configuration](../../docs/usage/configuration).

## Verbosity

`Output.Verbosity` decides how much you see. The useful values are `None`, `Normal`, `Detailed` and `Diagnostic`.
`Output.Verbosity` decides how much you see. The values are `None`, `Minimal`, `Normal`, `Detailed` and `Diagnostic`. `Minimal` is accepted but currently behaves as `Normal`, so the four worth knowing are the other ones.

`Normal` is the default and reports per file — right for a suite you expect to pass:

Expand All @@ -41,10 +41,10 @@ Invoke-Pester -Configuration $config

```
Running tests from 4 files.
[+] /home/you/pester-tutorial/Planetarium/Private/ConvertTo-AstronomicalUnit.Tests.ps1 311ms
[+] /home/you/pester-tutorial/Planetarium/Private/Test-PlanetName.Tests.ps1 45ms
[+] /home/you/pester-tutorial/Planetarium/Public/Get-Planet.Tests.ps1 87ms
[+] /home/you/pester-tutorial/Planetarium/Public/Get-PlanetDistance.Tests.ps1 48ms
[+] /home/you/pester-tutorial/Planetarium/Private/ConvertTo-AstronomicalUnit.Tests.ps1 311ms (3 tests)
[+] /home/you/pester-tutorial/Planetarium/Private/Test-PlanetName.Tests.ps1 45ms (4 tests)
[+] /home/you/pester-tutorial/Planetarium/Public/Get-Planet.Tests.ps1 87ms (5 tests)
[+] /home/you/pester-tutorial/Planetarium/Public/Get-PlanetDistance.Tests.ps1 48ms (3 tests)
Tests completed in 502ms
Tests Passed: 15, Failed: 0, Skipped: 0, Inconclusive: 0, NotRun: 0
```
Expand All @@ -57,7 +57,7 @@ Invoke-Pester -Configuration $config
```

```
Pester v6.0.0
Pester v6.1.0

Running tests from 4 files.

Expand Down Expand Up @@ -134,7 +134,7 @@ Invoke-Pester -Configuration $config
<environment machine-name="a6967ea17ed8" platform="Linux" ... />
```

The default format is `NUnitXml`, which nearly every CI system understands. `JUnitXml` and `NUnit3` are also available via `TestResult.OutputFormat`. See [Test results](../../docs/usage/test-results) for which to pick.
The default format is `NUnitXml`, which nearly every CI system understands. `NUnit2.5`, `NUnit3` and `JUnitXml` are the other values for `TestResult.OutputFormat`. See [Test results](../../docs/usage/test-results) for which to pick.

The file is a build artifact — something a run produces, not source. If you keep your projects under version control, add it to your `.gitignore`:

Expand Down
1 change: 1 addition & 0 deletions tutorial/6-code-coverage/1-measuring.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Invoke-Pester -Configuration $config
Tests completed in 870ms
Tests Passed: 24, Failed: 0, Skipped: 0, Inconclusive: 0, NotRun: 0
Processing code coverage result.
Code Coverage result processed in 96ms.
Covered 100% / 75%. 36 analyzed Commands in 7 Files.
```

Expand Down