Skip to content

Commit 4d2c57f

Browse files
committed
docs: ✏️ update documentation for Show-PesterResult and Show-PesterResultTree
* Added detailed descriptions and examples for `Show-PesterResult` and `Show-PesterResultTree`. * Updated the CHANGELOG to reflect the initial version and added notable features. * Improved help documentation for better clarity and usability.
1 parent af5b0d4 commit 4d2c57f

File tree

4 files changed

+62
-60
lines changed

4 files changed

+62
-60
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8-
## [0.1.0] Unreleased
8+
## [0.1.0] Initial Version
99

10+
### Added
11+
12+
- `Show-PesterResult` renders a TUI that let's you navigate your Pester run
13+
results. It shows item details as you navigate including the ability to from
14+
Container to Block to Test.
15+
- `Show-PesterResultTree` renders your Pester run as a tree structure.

docs/en-US/Show-PesterResult.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ schema: 2.0.0
88
# Show-PesterResult
99

1010
## SYNOPSIS
11-
{{ Fill in the Synopsis }}
11+
Open a TUI to explore the Pester result object.
1212

1313
## SYNTAX
1414

@@ -18,21 +18,24 @@ Show-PesterResult [[-PesterResult] <Run>] [-NoShortcutPanel] [-ProgressAction <A
1818
```
1919

2020
## DESCRIPTION
21-
{{ Fill in the Description }}
21+
Show a Pester result in a TUI (Text User Interface) using Spectre.Console.
22+
This function builds a layout with a header, a list of items, and a preview panel.
2223

2324
## EXAMPLES
2425

25-
### Example 1
26-
```powershell
27-
PS C:\> {{ Add example code here }}
26+
### EXAMPLE 1
27+
```
28+
$pesterResult = Invoke-Pester -Path "path\to\tests.ps1" -PassThru
29+
Show-PesterResult -PesterResult $pesterResult
2830
```
2931

30-
{{ Add example description here }}
32+
This example runs Pester tests and opens a TUI to explore the results.
3133

3234
## PARAMETERS
3335

3436
### -PesterResult
35-
{{ Fill PesterResult Description }}
37+
The Pester result object to display.
38+
This should be a Pester Run object.
3639

3740
```yaml
3841
Type: Run
@@ -47,7 +50,7 @@ Accept wildcard characters: False
4750
```
4851
4952
### -NoShortcutPanel
50-
{{ Fill NoShortcutPanel Description }}
53+
If specified, the shortcut panel will not be displayed at the bottom of the TUI.
5154
5255
```yaml
5356
Type: SwitchParameter
@@ -56,7 +59,7 @@ Aliases:
5659

5760
Required: False
5861
Position: Named
59-
Default value: None
62+
Default value: False
6063
Accept pipeline input: False
6164
Accept wildcard characters: False
6265
```
@@ -81,11 +84,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
8184
8285
## INPUTS
8386
84-
### None
85-
8687
## OUTPUTS
8788
88-
### System.Object
89+
### System.Void
8990
## NOTES
9091
9192
## RELATED LINKS

docs/en-US/Show-PesterResultTree.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ schema: 2.0.0
88
# Show-PesterResultTree
99

1010
## SYNOPSIS
11-
{{ Fill in the Synopsis }}
11+
Show a Pester result in a tree format using Spectre.Console.
1212

1313
## SYNTAX
1414

@@ -17,21 +17,26 @@ Show-PesterResultTree [[-PesterResult] <Run>] [-ProgressAction <ActionPreference
1717
```
1818

1919
## DESCRIPTION
20-
{{ Fill in the Description }}
20+
This function takes a Pester result object and formats it into a tree structure
21+
using Spectre.Console.
22+
It is useful for visualizing the structure of Pester results
23+
such as runs, containers, blocks, and tests.
2124

2225
## EXAMPLES
2326

24-
### Example 1
25-
```powershell
26-
PS C:\> {{ Add example code here }}
27+
### EXAMPLE 1
28+
```
29+
$pesterResult = Invoke-Pester -Path "path\to\tests.ps1" -PassThru
30+
Show-PesterResultTree -PesterResult $pesterResult
2731
```
2832

29-
{{ Add example description here }}
33+
This example runs Pester tests and displays the results in a tree format.
3034

3135
## PARAMETERS
3236

3337
### -PesterResult
34-
{{ Fill PesterResult Description }}
38+
The Pester result object to display.
39+
This should be a Pester Run object.
3540

3641
```yaml
3742
Type: Run
@@ -65,12 +70,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
6570
6671
## INPUTS
6772
68-
### None
69-
7073
## OUTPUTS
7174
7275
### System.Void
73-
7476
## NOTES
7577
7678
## RELATED LINKS

docs/en-US/about_PesterExplorer.help.md

Lines changed: 30 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,51 @@
22

33
## about_PesterExplorer
44

5-
```
6-
ABOUT TOPIC NOTE:
7-
The first header of the about topic should be the topic name.
8-
The second header contains the lookup name used by the help system.
9-
10-
IE:
11-
# Some Help Topic Name
12-
## SomeHelpTopicFileName
13-
14-
This will be transformed into the text file
15-
as `about_SomeHelpTopicFileName`.
16-
Do not include file extensions.
17-
The second header should have no spaces.
18-
```
19-
205
# SHORT DESCRIPTION
21-
{{ Short Description Placeholder }}
226

23-
```
24-
ABOUT TOPIC NOTE:
25-
About topics can be no longer than 80 characters wide when rendered to text.
26-
Any topics greater than 80 characters will be automatically wrapped.
27-
The generated about topic will be encoded UTF-8.
28-
```
7+
A TUI to explore Pester results.
298

309
# LONG DESCRIPTION
31-
{{ Long Description Placeholder }}
3210

33-
## Optional Subtopics
34-
{{ Optional Subtopic Placeholder }}
11+
A TUI built on top of PwshSpectreConsole to navigate and see your Pester run
12+
results.
3513

3614
# EXAMPLES
37-
{{ Code or descriptive examples of how to leverage the functions described. }}
15+
16+
To explore your result object you simply need to run `Show-PesterResult`
17+
18+
```pwsh
19+
# Run Pester and make sure to PassThru the object
20+
$pester = Invoke-Pester .\tests\ -PassThru
21+
# Now run the TUI
22+
Show-PesterResult $p
23+
```
24+
25+
You can also get a tree view of your pester results with
26+
`Show-PesterResultTree`.
27+
28+
```pwsh
29+
# Run Pester and make sure to PassThru the object
30+
$pester = Invoke-Pester .\tests\ -PassThru
31+
# Now get that in a Tree view
32+
Show-PesterResultTree $p
33+
```
3834

3935
# NOTE
40-
{{ Note Placeholder - Additional information that a user needs to know.}}
36+
37+
This only works in PowerShell 7 because PwshSpectreConsole is only for 7.
4138

4239
# TROUBLESHOOTING NOTE
43-
{{ Troubleshooting Placeholder - Warns users of bugs}}
4440

45-
{{ Explains behavior that is likely to change with fixes }}
41+
Make sure your Pester Results are passed back with the `-PassThru` parameter.
4642

4743
# SEE ALSO
48-
{{ See also placeholder }}
4944

50-
{{ You can also list related articles, blogs, and video URLs. }}
45+
- [Pester](pester.dev)
46+
- [PwshSpectreConsole](pwshspectreconsole.com)
5147

5248
# KEYWORDS
53-
{{List alternate names or titles for this topic that readers might use.}}
54-
55-
- {{ Keyword Placeholder }}
56-
- {{ Keyword Placeholder }}
57-
- {{ Keyword Placeholder }}
58-
- {{ Keyword Placeholder }}
5949

50+
- Pester
51+
- TDD
52+
- TUI

0 commit comments

Comments
 (0)