Skip to content

codegen: preserve coverage comments before ConditionalExpression's consequent #21301

Description

@AriPerkkio

Similar request as

Note that this kind of findings will be coming up more now that Vitest users are starting to use Vite 8. I'll be reporting them here whenever they are discovered. Thanks for all the fixes so far! 🙌

Input:

condition ? 
  /* v8 ignore next */ uncovered() : 
  coveredAlternate();

Expected output:

condition ? 
  /* v8 ignore next */ uncovered() : 
  coveredAlternate();

Actual output

condition ? 
  uncovered() : 
  coveredAlternate();

Reproduction

https://playground.oxc.rs/?t=ast&options=%7B%22run...

Downstream issue:

Image

Metadata

Metadata

Assignees

Labels

A-codegenArea - Code Generation

Type

Fields

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions