From 63c10795c6e9c8e070f690b34fc160b695b288e3 Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Wed, 28 May 2025 07:50:57 -0700 Subject: [PATCH 1/3] =?UTF-8?q?feat(PesterExplorer):=20=E2=9C=A8=20add=20d?= =?UTF-8?q?etailed=20comment-based=20help=20for=20functions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added comment-based help to several functions to improve documentation. * Enhanced user experience for new contributors by providing clear usage examples. * Updated `CHANGELOG.md` to reflect these additions. --- .github/prompts/PowerShellPrompts.prompt.md | 29 +++++ .markdownlint.json | 6 + CHANGELOG.md | 8 +- .../Private/Format-PesterObjectName.ps1 | 23 ++++ .../Private/Format-PesterTreeHash.ps1 | 41 +++++++ PesterExplorer/Private/Get-LastKeyPressed.ps1 | 26 +++++ PesterExplorer/Private/Get-ListFromObject.ps1 | 25 +++++ PesterExplorer/Private/Get-ListPanel.ps1 | 55 ++++++++-- PesterExplorer/Private/Get-PreviewPanel.ps1 | 103 ++++++++++++++++-- .../Private/Get-ShortcutKeyPanel.ps1 | 1 + PesterExplorer/Private/Get-TitlePanel.ps1 | 26 ++++- PesterExplorer/Public/Show-PesterResult.ps1 | 8 +- .../Public/Show-PesterResultTree.ps1 | 6 +- docs/.markdownlint.jsonc | 4 + 14 files changed, 339 insertions(+), 22 deletions(-) create mode 100644 .github/prompts/PowerShellPrompts.prompt.md create mode 100644 .markdownlint.json create mode 100644 docs/.markdownlint.jsonc diff --git a/.github/prompts/PowerShellPrompts.prompt.md b/.github/prompts/PowerShellPrompts.prompt.md new file mode 100644 index 0000000..2e2277f --- /dev/null +++ b/.github/prompts/PowerShellPrompts.prompt.md @@ -0,0 +1,29 @@ +--- +mode: 'ask' +--- +This project uses PwshSpectreConsole and Pester to render a TUI for Pester +results.The TUI allows users to navigate through Pester run results, viewing +details of containers, blocks, and tests. + +All suggestions should try to stay with 80 characters or 120 max. Use splatting +when possible. You can create new lines after `|` to make it more readable. + +# Examples +You can use the following when you create `.EXAMPLE` text for the comment based +help. All Object parameters will use the $run variable from the following code: + +``` +$run = Invoke-Pester -Path 'tests' -PassThru +``` + +# Example 1 +```powershell +$run = Invoke-Pester -Path 'tests' -PassThru +$run | Show-PesterResults +``` + +An explanation of the example should be provided in the `.EXAMPLE` section with +an empty line between the example and the explanation. + +# PowerShell Functions +All functions should have a `[CmdletBinding()]` attribute. diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..e8b02cb --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,6 @@ +{ + "MD013": false, + "MD024": { + "siblings_only": true + } +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c61f75..9e51201 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,18 +7,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased +### Added + +- Added comment based help on private functions to make it easier for new + contributors to grok. + ### Changed - The `Show-PesterResult` List panel now the files using relative path from the current directory. It also added padding on the selected item as well as an additional icon to show the highlight. +- Formatted all the functions to stay under 80 character line limit. This is a + preference. We will have a 120 hard limit (when possible). ### Fixed - Removed extra item from the stack that tracked which layer of the view you were in. - ## [0.1.0] Initial Version ### Added diff --git a/PesterExplorer/Private/Format-PesterObjectName.ps1 b/PesterExplorer/Private/Format-PesterObjectName.ps1 index ef13dbb..6978c35 100644 --- a/PesterExplorer/Private/Format-PesterObjectName.ps1 +++ b/PesterExplorer/Private/Format-PesterObjectName.ps1 @@ -1,4 +1,27 @@ function Format-PesterObjectName { + <# + .SYNOPSIS + Format the name of a Pester object for display. + + .DESCRIPTION + This function formats the name of a Pester object for display in a way that is compatible with Spectre.Console. + It uses the object's name and result to determine the appropriate icon and color for display. + It returns a string that can be used in Spectre.Console output. + + .PARAMETER Object + The Pester object to format. This should be a Pester Run or TestResult object. + It is mandatory and can be piped in. + + .PARAMETER NoColor + A switch to disable color formatting in the output. If specified, the name will be returned without any color + or icon. + + .EXAMPLE + $pesterResult.Containers[0].Blocks[0] | Format-PesterObjectName + + This would format the name of the first block in the first container of a Pester result, + returning a string with the appropriate icon and color based on the result of the test. + #> [CmdletBinding()] [OutputType([string])] param ( diff --git a/PesterExplorer/Private/Format-PesterTreeHash.ps1 b/PesterExplorer/Private/Format-PesterTreeHash.ps1 index 8b4f9ac..ad8758e 100644 --- a/PesterExplorer/Private/Format-PesterTreeHash.ps1 +++ b/PesterExplorer/Private/Format-PesterTreeHash.ps1 @@ -1,4 +1,45 @@ function Format-PesterTreeHash { + <# + .SYNOPSIS + Format a Pester object into a hashtable for tree display. + + .DESCRIPTION + This function takes a Pester object and formats it into a hashtable that can + be used to display a tree structure in a TUI (Text User Interface). It + handles different types of Pester objects such as Run, Container, Block, and + Test, recursively building a tree structure with children nodes. + + .PARAMETER Object + The Pester object to format. This can be a Run, Container, Block, or Test + object. The function will traverse the object and its children, formatting + them into a hashtable structure. + + .EXAMPLE + $run = Invoke-Pester -Path 'tests' -PassThru + $treeHash = Format-PesterTreeHash -Object $run + + .NOTES + This returns a hashtable with the following structure: + @{ + Value = "Pester Run" # or the name of the object + Children = @( + @{ + Value = "Container Name" + Children = @( + @{ + Value = "Block Name" + Children = @( + @{ + Value = "Test Name" + Children = @() + } + ) + } + ) + } + ) + } + #> [CmdletBinding()] [OutputType([hashtable])] param ( diff --git a/PesterExplorer/Private/Get-LastKeyPressed.ps1 b/PesterExplorer/Private/Get-LastKeyPressed.ps1 index 041995e..03de00b 100644 --- a/PesterExplorer/Private/Get-LastKeyPressed.ps1 +++ b/PesterExplorer/Private/Get-LastKeyPressed.ps1 @@ -1,4 +1,30 @@ function Get-LastKeyPressed { + <# + .SYNOPSIS + Get the last key pressed in the console. + + .DESCRIPTION + This function checks if any key has been pressed in the console and returns + the last key pressed. It is useful for handling user input in a TUI (Text + User Interface) environment. + + .EXAMPLE + $key = Get-LastKeyPressed + if ($key -eq "Enter") { + # Make the TUI do something + } + + This example retrieves the last key pressed and checks if it was the Enter + key. + + .NOTES + This function is meant to be used in a TUI context where you need to + handle user input. It reads the console key buffer and returns the last key + pressed without displaying it on the console. + #> + [CmdletBinding()] + [OutputType([ConsoleKeyInfo])] + param () $lastKeyPressed = $null while ([Console]::KeyAvailable) { $lastKeyPressed = [Console]::ReadKey($true) diff --git a/PesterExplorer/Private/Get-ListFromObject.ps1 b/PesterExplorer/Private/Get-ListFromObject.ps1 index de56dc7..12420fb 100644 --- a/PesterExplorer/Private/Get-ListFromObject.ps1 +++ b/PesterExplorer/Private/Get-ListFromObject.ps1 @@ -1,4 +1,29 @@ function Get-ListFromObject { + <# + .SYNOPSIS + Create a list from a Pester object for creating the items for the list. + + .DESCRIPTION + This function takes a Pester object (Run, Container, Block, or List) and + formats it into an ordered dictionary that can be used to display a tree + structure in a TUI (Text User Interface). It handles different types of + Pester objects, extracting relevant information such as container names, + block names, and test names. The function returns an ordered dictionary + where the keys are formatted names and the values are the corresponding + Pester objects. + + .PARAMETER Object + The Pester object to format. This can be a Run, Container, Block, or List + object. The function will traverse the object and its children, formatting + them into an ordered dictionary structure. + + .EXAMPLE + $run = Invoke-Pester -Path 'tests' -PassThru + $list = Get-ListFromObject -Object $run + + This example retrieves a Pester run object and formats it into an ordered + dictionary for tree display. + #> [CmdletBinding()] [OutputType([System.Collections.Specialized.OrderedDictionary])] param ( diff --git a/PesterExplorer/Private/Get-ListPanel.ps1 b/PesterExplorer/Private/Get-ListPanel.ps1 index 91b0581..008ba28 100644 --- a/PesterExplorer/Private/Get-ListPanel.ps1 +++ b/PesterExplorer/Private/Get-ListPanel.ps1 @@ -1,4 +1,29 @@ function Get-ListPanel { + <# + .SYNOPSIS + Create a list panel for displaying items in a TUI. + + .DESCRIPTION + This function generates a list panel that displays items in a TUI (Text User + Interface) using Spectre.Console. It formats the items based on whether they + are selected or not, and handles special cases like parent directories. + + .PARAMETER List + An array of strings to display in the list. Each item can be a file path, + a test name, or a special item like '..' for parent directories. + + .PARAMETER SelectedItem + The item that is currently selected in the list. This will be highlighted + differently from unselected items. + + .EXAMPLE + Get-ListPanel -List @('file1.txt', 'file2.txt', '..') -SelectedItem 'file1.txt' + + This example creates a list panel with three items, highlighting 'file1.txt' + as the selected item. + .NOTES + This is meant to be called by the main TUI function: Show-PesterResult + #> [CmdletBinding()] param ( [array] @@ -17,9 +42,11 @@ function Get-ListPanel { if($name -eq '..') { # This is a parent item, so we show it as a folder if ($name -eq $SelectedItem) { - Write-SpectreHost ":up_arrow: [Turquoise2]$name[/]" -PassThru | Format-SpectrePadded -Padding 1 + Write-SpectreHost ":up_arrow: [Turquoise2]$name[/]" -PassThru | + Format-SpectrePadded -Padding 1 } else { - Write-SpectreHost "$name" -PassThru | Format-SpectrePadded -Padding 0 + Write-SpectreHost "$name" -PassThru | + Format-SpectrePadded -Padding 0 } } elseif(Test-Path $name){ @@ -28,18 +55,32 @@ function Get-ListPanel { $name ) if ($name -eq $SelectedItem) { - Format-SpectreTextPath -Path $relativePath | Format-SpectrePadded -Padding 1 + Format-SpectreTextPath -Path $relativePath | + Format-SpectrePadded -Padding 1 } else { - Format-SpectreTextPath -Path $relativePath -PathStyle $unselectedStyle | Format-SpectrePadded -Padding 0 + $formatSpectreTextPathSplat = @{ + Path = $relativePath + PathStyle = $unselectedStyle + } + Format-SpectreTextPath @formatSpectreTextPathSplat | + Format-SpectrePadded -Padding 0 } } else { if ($name -eq $SelectedItem) { - Write-SpectreHost ":right_arrow: [Turquoise2]$name[/]" -PassThru | Format-SpectrePadded -Padding 1 + $writeSpectreHostSplat = @{ + PassThru = $true + Message = ":right_arrow: [Turquoise2]$name[/]" + } + Write-SpectreHost @writeSpectreHostSplat | + Format-SpectrePadded -Padding 1 } else { - Write-SpectreHost $name -PassThru | Format-SpectrePadded -Padding 0 + Write-SpectreHost $name -PassThru | + Format-SpectrePadded -Padding 0 } } } - $results | Format-SpectreRows | Format-SpectrePanel -Header "[white]List[/]" -Expand + $results | + Format-SpectreRows | + Format-SpectrePanel -Header "[white]List[/]" -Expand } diff --git a/PesterExplorer/Private/Get-PreviewPanel.ps1 b/PesterExplorer/Private/Get-PreviewPanel.ps1 index 8486b39..a8f9d33 100644 --- a/PesterExplorer/Private/Get-PreviewPanel.ps1 +++ b/PesterExplorer/Private/Get-PreviewPanel.ps1 @@ -1,4 +1,51 @@ function Get-PreviewPanel { + <# + .SYNOPSIS + Get a preview panel for a selected Pester object. + + .DESCRIPTION + This function generates a preview panel for a selected Pester object, such + as a Run, Container, Block, or Test. It formats the object and its results + into a structured output suitable for display in a TUI (Text User + Interface). The function handles different types of Pester objects and + extracts relevant information such as test results, standard output, and + error records. The output is formatted into a grid and panel for better + readability. The function returns a formatted panel that can be displayed in + a TUI environment. If no item is selected, it prompts the user to select an + item. If the selected item is a Test, it shows the test result and the code + tested. If the selected item is a Run, Container, or Block, it shows the + results in a tree structure. It also displays standard output and errors if + they exist. The function is designed to be used in a Pester Explorer + context, where users can explore and preview Pester test results in a + structured and user-friendly manner. + + .PARAMETER Items + A hashtable containing Pester objects (Run, Container, Block, Test) to be + displayed in the preview panel. + + .PARAMETER SelectedItem + The key of the selected item in the Items hashtable. This can be a Pester + object such as a Run, Container, Block, or Test. + + .EXAMPLE + $run = Invoke-Pester -Path 'tests' -PassThru + $items = Get-ListFromObject -Object $run + $selectedItem = 'Test1' + Get-PreviewPanel -Items $items -SelectedItem $selectedItem + + This example retrieves a Pester run object, formats it into a list of items, + and generates a preview panel for the selected item 'Test1'. + + .NOTES + This function is part of the Pester Explorer module and is used to display + Pester test results in a TUI. It formats the output using Spectre.Console + and provides a structured view of the Pester objects. The function handles + different types of Pester objects and extracts relevant information for + display. It is designed to be used in a Pester Explorer context, where users + can explore and preview Pester test results in a structured and + user-friendly manner. + #> + [CmdletBinding()] param ( [hashtable] $Items, @@ -6,8 +53,12 @@ function Get-PreviewPanel { $SelectedItem ) if($SelectedItem -like "*..") { + $formatSpectreAlignedSplat = @{ + HorizontalAlignment = 'Center' + VerticalAlignment = 'Middle' + } return "[grey]Please select an item.[/]" | - Format-SpectreAligned -HorizontalAlignment Center -VerticalAlignment Middle | + Format-SpectreAligned @formatSpectreAlignedSplat | Format-SpectrePanel -Header "[white]Preview[/]" -Expand } $object = $Items.Item($SelectedItem) @@ -17,17 +68,43 @@ function Get-PreviewPanel { # For Tests Let's print some more details if ($object.GetType().Name -eq "Test") { - $result += $object.Result | Format-SpectrePanel -Header "Test Result" -Border "Rounded" -Color "White" + $formatSpectrePanelSplat = @{ + Header = "Test Result" + Border = "Rounded" + Color = "White" + } + $result += $object.Result | + Format-SpectrePanel @formatSpectrePanelSplat # Show the code tested - $result += $object.ScriptBlock | Get-SpectreEscapedText | Format-SpectrePanel -Header "Test Code" -Border "Rounded" -Color "White" + $formatSpectrePanelSplat = @{ + Header = "Test Code" + Border = "Rounded" + Color = "White" + } + $result += $object.ScriptBlock | + Get-SpectreEscapedText | + Format-SpectrePanel @formatSpectrePanelSplat } else { $data = Format-PesterTreeHash -Object $object Write-Debug $($data|ConvertTo-Json -Depth 10) - $result += Format-SpectreTree -Data $data | Format-SpectrePanel -Title "Results" -Border "Rounded" -Color "White" + $formatSpectrePanelSplat = @{ + Header = "Results" + Border = "Rounded" + Color = "White" + } + $result += Format-SpectreTree -Data $data | + Format-SpectrePanel @formatSpectrePanelSplat } if($null -ne $object.StandardOutput){ - $result += $object.StandardOutput | Get-SpectreEscapedText | Format-SpectrePanel -Header "Standard Output" -Border "Ascii" -Color "White" + $formatSpectrePanelSplat = @{ + Header = "Standard Output" + Border = "Ascii" + Color = "White" + } + $result += $object.StandardOutput | + Get-SpectreEscapedText | + Format-SpectrePanel @formatSpectrePanelSplat } @@ -35,10 +112,20 @@ function Get-PreviewPanel { if($object.ErrorRecord.Count -gt 0) { $errorRecords = @() $object.ErrorRecord | ForEach-Object { - $errorRecords += $_ | Format-SpectreException -ExceptionFormat ShortenEverything + $errorRecords += $_ | + Format-SpectreException -ExceptionFormat ShortenEverything + } + $formatSpectrePanelSplat = @{ + Header = "Errors" + Border = "Rounded" + Color = "Red" } - $result += $errorRecords | Format-SpectreRows | Format-SpectrePanel -Header "Errors" -Border "Rounded" -Color "Red" + $result += $errorRecords | + Format-SpectreRows | + Format-SpectrePanel @formatSpectrePanelSplat } - return $result | Format-SpectreGrid | Format-SpectrePanel -Header "[white]Preview[/]" -Expand + return $result | + Format-SpectreGrid | + Format-SpectrePanel -Header "[white]Preview[/]" -Expand } diff --git a/PesterExplorer/Private/Get-ShortcutKeyPanel.ps1 b/PesterExplorer/Private/Get-ShortcutKeyPanel.ps1 index a56dbae..cab5b7e 100644 --- a/PesterExplorer/Private/Get-ShortcutKeyPanel.ps1 +++ b/PesterExplorer/Private/Get-ShortcutKeyPanel.ps1 @@ -1,4 +1,5 @@ function Get-ShortcutKeyPanel { + [CmdletBinding()] $shortcutKeys = @( "Up, Down - Navigate", "Enter - Explore", diff --git a/PesterExplorer/Private/Get-TitlePanel.ps1 b/PesterExplorer/Private/Get-TitlePanel.ps1 index cf4f322..4f883ee 100644 --- a/PesterExplorer/Private/Get-TitlePanel.ps1 +++ b/PesterExplorer/Private/Get-TitlePanel.ps1 @@ -1,9 +1,33 @@ function Get-TitlePanel { + <# + .SYNOPSIS + Get a title panel for the Pester Explorer. + + .DESCRIPTION + This function generates a title panel for the Pester Explorer, displaying + the current date and time, and optionally the name of a Pester object if + provided. The title panel is formatted for display in a TUI (Text User + Interface) using Spectre.Console. It returns a formatted panel that can be + displayed in the Pester Explorer interface. If an item is provided, it + includes the type and formatted name of the item in the title panel. + + .PARAMETER Item + The Pester object to include in the title panel. This can be a Run, + Container, Block, or Test object. If provided, the function will format + the object's name and type into the title panel. If not provided, only + the current date and time will be displayed. + + .EXAMPLE + $titlePanel = Get-TitlePanel -Item $somePesterObject + + This example retrieves a title panel for the Pester Explorer, including + #> [CmdletBinding()] + [OutputType([Spectre.Console.Panel[]])] param( $Item ) - # TODO: Add duration and other information to the title panel. + # TODO: HeyItsGilbert/PesterExplorer#4 Add More info! $titles = @( "Pester Explorer - [gray]$(Get-Date)[/]" ) diff --git a/PesterExplorer/Public/Show-PesterResult.ps1 b/PesterExplorer/Public/Show-PesterResult.ps1 index c804f34..3d81c07 100644 --- a/PesterExplorer/Public/Show-PesterResult.ps1 +++ b/PesterExplorer/Public/Show-PesterResult.ps1 @@ -121,8 +121,12 @@ function Show-PesterResult { # Generate new data $titlePanel = Get-TitlePanel -Item $object - $listPanel = Get-ListPanel -List $list -SelectedItem $selectedItem - $previewPanel = Get-PreviewPanel -Items $items -SelectedItem $selectedItem + $panelSplat = @{ + List = $list + SelectedItem = $selectedItem + } + $listPanel = Get-ListPanel @panelSplat + $previewPanel = Get-PreviewPanel @panelSplat # Update layout $layout["header"].Update($titlePanel) | Out-Null diff --git a/PesterExplorer/Public/Show-PesterResultTree.ps1 b/PesterExplorer/Public/Show-PesterResultTree.ps1 index 7b31efc..57657d5 100644 --- a/PesterExplorer/Public/Show-PesterResultTree.ps1 +++ b/PesterExplorer/Public/Show-PesterResultTree.ps1 @@ -4,9 +4,9 @@ function Show-PesterResultTree { Show a Pester result in a tree format using Spectre.Console. .DESCRIPTION - This function takes a Pester result object and formats it into a tree structure - using Spectre.Console. It is useful for visualizing the structure of Pester results - such as runs, containers, blocks, and tests. + This function takes a Pester result object and formats it into a tree + structure using Spectre.Console. It is useful for visualizing the structure + of Pester results such as runs, containers, blocks, and tests. .PARAMETER PesterResult The Pester result object to display. This should be a Pester Run object. diff --git a/docs/.markdownlint.jsonc b/docs/.markdownlint.jsonc new file mode 100644 index 0000000..7af7e9a --- /dev/null +++ b/docs/.markdownlint.jsonc @@ -0,0 +1,4 @@ +{ + // These docs are autogenerated and this is the expected format. + "MD025": false +} From 6e661e2fb9739595fde78ba79a8fd846afb14f74 Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Wed, 28 May 2025 07:53:58 -0700 Subject: [PATCH 2/3] =?UTF-8?q?feat(Get-ShortcutKeyPanel):=20=E2=9C=A8=20a?= =?UTF-8?q?dd=20detailed=20comment-based=20help=20for=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Enhanced the function documentation with a comprehensive `.SYNOPSIS`, `.DESCRIPTION`, and `.EXAMPLE`. - Improved readability and usability of the shortcut keys panel for the Pester Explorer TUI. --- .../Private/Get-ShortcutKeyPanel.ps1 | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/PesterExplorer/Private/Get-ShortcutKeyPanel.ps1 b/PesterExplorer/Private/Get-ShortcutKeyPanel.ps1 index cab5b7e..76e1381 100644 --- a/PesterExplorer/Private/Get-ShortcutKeyPanel.ps1 +++ b/PesterExplorer/Private/Get-ShortcutKeyPanel.ps1 @@ -1,4 +1,23 @@ function Get-ShortcutKeyPanel { + <# + .SYNOPSIS + Get a panel displaying shortcut keys for the Pester Explorer TUI. + + .DESCRIPTION + This function generates a panel that displays the shortcut keys available + in the Pester Explorer TUI. The keys are formatted for display using + Spectre.Console, providing a user-friendly interface for navigating the + Pester Explorer. The panel includes common shortcuts for navigation, + exploration, and exiting the TUI. It returns a formatted panel that can be + displayed in the Pester Explorer interface. + + .EXAMPLE + $shortcutPanel = Get-ShortcutKeyPanel + + This example retrieves a panel displaying the shortcut keys for the Pester + Explorer TUI. The panel includes keys for navigation, exploration, and + exiting the TUI, formatted for easy readability. + #> [CmdletBinding()] $shortcutKeys = @( "Up, Down - Navigate", @@ -7,10 +26,14 @@ function Get-ShortcutKeyPanel { "Ctrl+C - Exit" # TODO: Add a key to jump to the test ) + $formatSpectreAlignedSplat = @{ + HorizontalAlignment = 'Center' + VerticalAlignment = 'Middle' + } $result = $shortcutKeys | Foreach-Object { "[grey]$($_)[/]" } | Format-SpectreColumns -Padding 5 | - Format-SpectreAligned -HorizontalAlignment Center -VerticalAlignment Middle | + Format-SpectreAligned @formatSpectreAlignedSplat | Format-SpectrePanel -Expand -Border 'None' return $result } From 1f5b8aa51cabdd3bbd864d0e3e9f5a212c0d6640 Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Wed, 28 May 2025 07:54:55 -0700 Subject: [PATCH 3/3] Undo show-pesterresult change --- PesterExplorer/Public/Show-PesterResult.ps1 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/PesterExplorer/Public/Show-PesterResult.ps1 b/PesterExplorer/Public/Show-PesterResult.ps1 index 3d81c07..c804f34 100644 --- a/PesterExplorer/Public/Show-PesterResult.ps1 +++ b/PesterExplorer/Public/Show-PesterResult.ps1 @@ -121,12 +121,8 @@ function Show-PesterResult { # Generate new data $titlePanel = Get-TitlePanel -Item $object - $panelSplat = @{ - List = $list - SelectedItem = $selectedItem - } - $listPanel = Get-ListPanel @panelSplat - $previewPanel = Get-PreviewPanel @panelSplat + $listPanel = Get-ListPanel -List $list -SelectedItem $selectedItem + $previewPanel = Get-PreviewPanel -Items $items -SelectedItem $selectedItem # Update layout $layout["header"].Update($titlePanel) | Out-Null