vscode-adapter
vscode-adapter copied to clipboard
Console.WriteLine hangs test execution
Test execution gets stuck if the test uses [Console]::WriteLine to print something, unless it's JSON.
Demo:
Describe 'Pester Tests Extension' {
It 'Is Fine With JSON' {
[Console]::WriteLine('{"valid": "json"}')
}
It 'Is Fine With Write-Host' {
Write-Host 'not json'
}
It 'Dislikes Console.WriteLine' {
[Console]::WriteLine('not json')
}
}
Executing it directly works:
If I execute it through the extension, execution gets stuck on the third test:
When I click Cancel Test Run (stop icon), I get this error: