Support errors with messages containing ANSI color code
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- react, typescript
- Bereich
- frontend
Rechercherichtung
Beginne damit, die React-Komponente zu finden, die im Repository Fehlermeldungen rendert, und reproduziere dann das Problem mit einer Nachricht, die ANSI-Farbcodes enthält. Als erledigt gilt die Aufgabe, wenn die Codes als Farben gerendert werden, statt wörtlich angezeigt zu werden, mit gut lesbarer Darstellung und Abdeckung für Nachrichten, die ANSI enthalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
🤔 What's the problem you're trying to solve?
Hello 👋
I've started to use Cucumber-js with its default HTML reporting tool
In order to have a more flexible assertions, I'm also using Jest's expect as well as jest-extended
Both of those assertion modules are throwing exceptions with messages that contains ANSI colore code characters
Unfortunately, those characters don't seems to be handled the right way, as those codes are not taken into account to highlight the text with the right color, but instead are displayed as is.
See this screen shoot example :
Someone form the help-js channel of Cucumber's Discord advised me to create a feature request here about this trouble
✨ What's your proposed solution?
Also have the React analyzing the error messages, and have each of the ANSI color codes turned into a corresponding block to have the text colorized the right way ?
Maybe it would necessitate to change the way the background color is managed on such error message display, else I guess that a red colored text displayed over a red background would be quite unreadable
As the coloring of such tools is most of the time targeting terminals with black background, maybe it would be better to have error messages simply surrounded by a red frame, but displayed over a black background ?
⛏ Have you considered any alternatives or workarounds?
Except using another HTML reporting tool, I've also considered the following :
- catch the exceptions thrown by expect, and perform the stripping of color codes from the message before rethrowing it
- add an extra step in my CI in order to apply a transformation on the produced HTML file(s) myself
- create a PR myself to solve this problem, but I didn't knew in which Cucumber's github repository I had to do it, and since I've learned it's related to current repository, as I'm not familiar at with React coding, I prefer simply creating the issue 😛
But none of those solutions are really appealing 😢
📚 Any additional context?
No response
- Vorherrschende Sprache
- TypeScript
- Sterne
- 39
- Forks
- 13
- Ø Merge
- 1 T. 10 Std.
- Gemergte PRs (30 T.)
- 6
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus cucumber/react-components
-
:zap: enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
cucumber/react-components#428 · 4 Kommentare ·
-
Anchor links don't select the targeted test on loadEvtl. wieder frei @davidjgoss hat das vor 298 Tagen übernommen, und es ist kein Pull Request offen. Offen:bug: bug
cucumber/react-components#422 · 1 zugewiesene Person ·
-
Add more information about hookEvtl. wieder frei @davidjgoss hat das vor 297 Tagen übernommen, und es ist kein Pull Request offen. Offen
cucumber/react-components#496 · 11 Kommentare · 1 Reaktion · 1 zugewiesene Person ·
-
Dependency DashboardOffen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 15/100
cucumber/react-components#409 ·
-
:zap: enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 55/100
cucumber/react-components#395 · 3 Kommentare ·
Alle Issues in cucumber/react-components
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
Maintainer antworten meist innerhalb von 1 Tag
-
frontend testing
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
vendrabuck/HERD#1588 ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation good first issue priority: low
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
art-audio
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100