question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ansi code escape from jest output

See original GitHub issue

Using standard vue-cli init webpack

upon test errors, I got problems and inline error messages corrupted with ansi codes:

image

I can hack them out using this in workspace config:

"jest.pathToJest": "node_modules/.bin/jest --no-color",

but in that case the ‘debug’ button will fail saying it is not able to find jest.js: image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:8
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
alexgorbatchevcommented, May 15, 2018

Curious if this was published? I’m still seeing it with vscode-jest 2.7.2.

image

1reaction
JasonLearmouthcommented, Mar 29, 2018

Same issue, --no-color does fix this. If that is a workaround for people who aren’t using debug, perhaps it’s worth documenting?

Windows 10 VSCode Version 1.21.1 Commit 79b44aa704ce542d8ca4a3cc44cfca566e7720f1 Date 2018-03-14T14:46:47.128Z Shell 1.7.9 Renderer 58.0.3029.110 Node 7.9.0 Architecture x64

npm -v 5.6.0 node -v v9.6.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

ANSI escape code - Wikipedia
ANSI escape sequences are a standard for in-band signaling to control cursor location, color, font styling, and other options on video text terminals...
Read more >
jest-serializer-ansi-escapes - npm package | Snyk
Jest snapshot serializer for ANSI escape sequences For more information about how to use this package see README. Latest version published 4 months...
Read more >
Jest snapshot tests failing with same output because of ANSI
Print again. I found out that my snapshots contained ANSI escape codes, so after some searching I found this GitHub issue comment -...
Read more >
relmify/jest-serializer-strip-ansi - NPM Package Overview
jest snapshot serializer for removing ANSI text formatting escape codes. Version: 1.0.2 was published by leilapearson.
Read more >
node_modules/jest-message-util/node_modules/ansi-styles
ANSI escape codes for styling strings in the terminal ... To use these, call the associated conversion function with the intended output, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found