VSCode
VSCode improvements
Use legacy code lens
With Pester 5 it is finally possible to run and debug just a single test in VSCode!
In the latest PowerShell extension for VSCode you can enable Use Legacy Code Lens option which will enable Run tests
on all Describe
, Context
and It
blocks. You can run a whole block, any child block, or any test individually. You can also run tests that are marked as skipped by running them individually.
Actually there is a bug, and the option is called Enable Legacy Code Lens, and is enabled by default and should be disabled for Pester 5. 😁 Take advantage of this and go try it right now!
Instructions: In Visual Studio Code, select File | Preferences | Settings (or type Ctrl+,). In the Settings window, under the User tab, select Extensions | PowerShell Configuration. Uncheck the Pester: Use Legacy Code Lens checkbox. Close the Settings window.
Output verbosity
You can specify verbosity in VSCode, to see normal or detailed output, or to take it from PesterPreference. This also works for Pester 4!