question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't run Pester Tests in PowerShell Extension

See original GitHub issue

Issue Type: Bug

From a file with a Pester test, hit Run tests:

Invoke-Pester : A parameter cannot be found that matches parameter name 'Show'.
At C:\Users\<deleted>\.vscode\extensions\ms-vscode.powershell-2020.4.0\InvokePesterStub.ps1:137 char:113
+ ... Option @{IncludeVSCodeMarker=$true} -TestName $TestName -Show $pester ...
+                                                             ~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Invoke-Pester], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Invoke-Pester

PS>

Extension version: 2020.4.0 VS Code version: Code 1.44.2 (ff915844119ce9485abfe8aa9076ec76b5300ddd, 2020-04-16T16:36:23.138Z) OS version: Windows_NT x64 10.0.18363

System Info
Item Value
CPUs Intel® Xeon® CPU E5-1650 v4 @ 3.60GHz (12 x 3592)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.92GB (15.10GB free)
Process Argv .
Screen Reader no
VM 0%

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rkeithhillcommented, May 1, 2020

Heh, I thought at the time we did this that teasing out this logic into an accessible PS script would come in handy. 😃

0reactions
TylerLeonhardtcommented, May 1, 2020

Actually if you wanna just update the script here:

$HOME\.vscode\extensions\ms-vscode.powershell-2020.4.0\InvokePesterStub.ps1

to not include the -Show parameter in any of the Invoke-Pester calls… that should unblock you too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code: Pester tests not showing in test explorer
My VS code test explorer tab is always empty for any Powershell Pester tests. I have the latest Powershell Extension installed (v2022.8.5).
Read more >
Invoke-Pester
The Invoke-Pester function runs Pester tests, including *.Tests.ps1 files and Pester tests in PowerShell scripts. You can run scripts that include Pester ......
Read more >
Debugging PowerShell Modules with Pester Unit Tests in ...
If you are the author of a PowerShell module, you can use the built-in debugging tools in Microsoft Visual Studio Code to debug...
Read more >
Test Powershell code quality automatically - AutoSysOps
This blog post describes different ways of using Pester and PSScriptAnalyzer to perform linting and code standard testing on your powershell ...
Read more >
Pester tests help pinpoint infrastructure issues - TechTarget
Enter the Pester module for PowerShell, which provides a testing framework for PowerShell code and infrastructure setups. The advantage of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found