jestjs/jest

Use cross browser stack trace utils

Open

#10.023 aberto em 11 de mai. de 2020

Ver no GitHub
 (5 comments) (0 reactions) (0 assignees)TypeScript (6.653 forks)batch import
:rocket: Feature RequestHelp WantedPinned

Métricas do repositório

Stars
 (45.361 stars)
Métricas de merge de PR
 (Mesclagem média 11d 22h) (11 fundiu PRs em 30d)

Description

🚀 Feature Proposal

It'd be awesome and fairly simple (I hope) to swap out stack-utils for https://github.com/stacktracejs/error-stack-parser which would give you the same metadata about stacks but work for non v8 stack traces

Motivation

We want to use jest-message-util to format errors from multiple browsers

Pitch

We are using a lot of jest in https://github.com/4Catalyzer/karma-jest which is a multi-browser environment via karma. Jest's excellent error formatting utils from jest-message-util work great (after mapping browser stacks to correct ones via source maps), but the formatting utils assume V8 based stack traces, which means FF and safari traces don't get nicely printed and call-site files are incorrectly parsed. This is due to some bad regexs and stack-utils which is designed for node.

If this seems like a good idea i can problem send a PR for it

Guia do colaborador