Closed giulianolatini closed 1 year ago
I have the same issue in WSL > ubuntu
I added a console log before the JSON.parse and I get this error and this is what it's trying to parse:
[Extension Host] [?1h[?1l{"type":"Block","id":"/home/mihai/p/powershell/Math.Tests.ps1>>Get-Cactus","error":null,"file":"/home/mihai/p/powershell/Math.Tests.ps1","startLine":10,"endLine":15,"label":"Get-Cactus","result":7,"duration":0.0,"durationDetail":"(0ms|0ms)","message":null,"expected":null,"actual":null,"targetFile":null,"targetLine":-1,"parent":"/home/mihai/p/powershell/Math.Tests.ps1","tags":[]}
'[Extension Host] \x1B[?1h\x1B[?1l{"type":"Block","id":"/home/mihai/p/powershell/Math.Tests.ps1>>Get-Cactus","error":null,"file":"/home/mihai/p/powershell/Math.Tests.ps1","startLine":10,"endLine":15,"label":"Get-Cactus","result":7,"duration":0.0,"durationDetail":"(0ms|0ms)","message":null,"expected":null,"actual":null,"targetFile":null,"targetLine":-1,"parent":"/home/mihai/p/powershell/Math.Tests.ps1","tags":[]}'
It looks like the output from the psProcess has some escape sequences at the start. Not sure why they are added there.
Also tracked in this issue https://github.com/pester/vscode-adapter/issues/104. It is a problem for macOS and Linux distros.
When I run pester test extension into VScode ARM on my MacBookPro with M1Pro, I can't see red/green notifier on the test summary or other indication on the tests' code. If I play the tests in the console, I see the running test write-out output.
Powershell Version:
What I see on display
Output error in VSCode log. This message is repeated three times: