Open
Description
Type of issue
Other (describe below)
Feedback
Ref: PowerShell/PowerShell#20722
Summary Process:
- Register the Feedback Provider
- Create a PowerShell Runspace and mock the commands you want to test (or don't)
- Invoke the command in the runspace
- Use FeedbackHub.GetFeedback() to get the results
- Filter to the ones generated by the provider
- Assert the correct item was produced
C# Example (Should be discouraged in favor of pester):
https://github.com/JustinGrote/MgAqDetect/blob/main/Test/FeedbackProvider.tests.cs
Pester Example:
https://github.com/JustinGrote/MgAqDetect/blob/main/Test/FeedbackProvider.tests.ps1
Page URL
Content source URL
Author
sdwheeler
Document Id
7ec77067-f2c9-46c7-040d-ad51eeb60caa