nodejs / nodejs/node

v8 test coverage in jest is incorrect when upgrading to 20.10.0

未关闭
#51,251 20 条评论 14 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

inspector v8 engine
主要语言
JavaScript
星标
122k
派生
37.3k
平均合并
4 天 2 小时
30 天内合并 PR
283

描述

Version

20.10.0

Platform

Macbook Pro M1/M2 / Ubuntu 22.04 x64 (GitHub runner)

Subsystem

V8

What steps will reproduce the bug?

See https://github.com/jestjs/jest/issues/14766

How often does it reproduce? Is there a required condition?

Found a consistent repro, but initially it was flaky because of the order jest was running tests.

What is the expected behavior? Why is that the expected behavior?

20.9.0 just works
20.10.0 fails

So this is a regression.

What do you see instead?

Coverage information is wrong in jest, unclear why, but based what we know Node is the place where this will most likely be fixed.

Additional information

Based on https://nodejs.org/en/blog/release/v20.10.0, cc @joyeecheung as you might be interested/know what's wrong.

Based on https://github.com/jestjs/jest/issues/14764, cc @kwmhp as you experienced the same problem as us, and figure out the version upgrade is what triggers it.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从链接的 Jest 复现用例开始,在列出的 MacBook 和 Ubuntu 平台上比较 Node 20.9.0 与 20.10.0 之间的 coverage 行为。阅读 Node v20.10.0 的发布说明,并确定该回归是否会在 Node 本身中复现;完成的标准是,在报告的测试顺序条件下 coverage 输出正确。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, node.js
领域
backend, testing-qa
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
需要澄清
新手友好度
42/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。