Skip to content
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

Testing api TestRun.appendOutput does not support ANSI color #148397

Closed
zxch3n opened this issue Apr 29, 2022 · 5 comments · Fixed by #148594
Closed

Testing api TestRun.appendOutput does not support ANSI color #148397

zxch3n opened this issue Apr 29, 2022 · 5 comments · Fixed by #148594
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug testing Built-in testing support verification-found Issue verification failed verified Verification succeeded
Milestone

Comments

@zxch3n
Copy link

zxch3n commented Apr 29, 2022

Issue Type: Bug

Error information in peek error view does not support ANSI color.

Expected behavior

  • Colors are rendered
  • Or all ANSI color control characters are filtered

Related issue: vitest-dev/vscode#19

image

VS Code version: Code 1.66.2 (dfd34e8, 2022-04-11T07:46:01.075Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No

System Info
Item Value
CPUs AMD Ryzen 9 3900X 12-Core Processor (24 x 3800)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.95GB (22.37GB free)
Process Argv --crash-reporter-id d11854f1-3a77-48cd-9674-a8efe260feee
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30475216

@connor4312 connor4312 added bug Issue identified by VS Code Team member as probable bug testing Built-in testing support labels Apr 29, 2022
@connor4312 connor4312 added this to the May 2022 milestone May 2, 2022
connor4312 added a commit that referenced this issue May 2, 2022
connor4312 added a commit that referenced this issue May 3, 2022
* testing: hide ANSI color codes in test peeks

Fixes #148397

* refactor: name test message type enum more appropriately
@TylerLeonhardt TylerLeonhardt added the author-verification-requested Issues potentially verifiable by issue author label Jun 2, 2022
@vscodenpa
Copy link

This bug has been fixed in the latest release of VS Code Insiders!

@zxch3n, you can help us out by commenting /verified if things are now working as expected.

If things still don't seem right, please ensure you're on version 15253f1 of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.

Happy Coding!

@TylerLeonhardt
Copy link
Member

@connor4312 how about some verification steps unless @zxch3n resurfaces?

@TylerLeonhardt TylerLeonhardt added the verification-steps-needed Steps to verify are needed for verification label Jan 27, 2023
@connor4312
Copy link
Member

  1. Install the vitest test extension
  2. Clone and install https://github.com/connor4312/nodejs-testing
  3. Make a test in parsing.test.ts fail
  4. Verify you don't see a bunch of ANSI sequences in the output upon failure

@connor4312 connor4312 removed the verification-steps-needed Steps to verify are needed for verification label Jan 27, 2023
@TylerLeonhardt
Copy link
Member

TylerLeonhardt commented Jan 27, 2023

In the +4 more lines section of the Peek I still see some ANSI at the top:
image

With that said, the diff view looks ok:
image

@TylerLeonhardt TylerLeonhardt added the verification-found Issue verification failed label Jan 27, 2023
@vscodenpa vscodenpa removed the insiders-released Patch has been released in VS Code Insiders label Jan 27, 2023
@connor4312
Copy link
Member

That's actually separate, tracked in #166270 🙂

I'll mark this as verified since it looks like the ANSI colors are correctly omitted in your screenshot.

@connor4312 connor4312 added the verified Verification succeeded label Jan 28, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug testing Built-in testing support verification-found Issue verification failed verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@connor4312 @TylerLeonhardt @zxch3n @vscodenpa and others