-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
area-sdk-docsArea - SDK docsArea - SDK docs
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
Metadata
Metadata
Assignees
Labels
area-sdk-docsArea - SDK docsArea - SDK docs