jestjs/jest

Use cross browser stack trace utils

Open

#10,023 创建于 2020年5月11日

在 GitHub 查看
 (5 评论) (0 反应) (0 负责人)TypeScript (6,653 fork)batch import
:rocket: Feature RequestHelp WantedPinned

仓库指标

Star
 (45,361 star)
PR 合并指标
 (平均合并 11天 22小时) (30 天内合并 11 个 PR)

描述

🚀 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

贡献者指南