-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat(test): add transcript helper functions and tests #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| $TEST_TRANSCRIPT_FILE = "test_transcript.log" | ||
|
|
||
| function Start-MyTranscript { |
Check warning
Code scanning / PSScriptAnalyzer
Function 'Start-MyTranscript' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning
| Start-Transcript -Path $TEST_TRANSCRIPT_FILE | ||
| } | ||
|
|
||
| function Stop-MyTranscript { |
Check warning
Code scanning / PSScriptAnalyzer
Function 'Stop-MyTranscript' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning
|
|
||
| Start-MyTranscript | ||
|
|
||
| Write-Host "This is a test transcript." |
Check warning
Code scanning / PSScriptAnalyzer
File 'transcriptHelp.test.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
Introduce helper functions for managing transcript files during tests, along with corresponding tests to validate their functionality.