Skip to content

v8 ignore next doesn't ignore catch block with rolldown-vite #9094

Description

@viceice

Describe the bug

v8 ignore next doesn't have an effect on the catch block

Reproduction

try {
  console.log('test');
catch (err) /* v8 ignore next */ {
  consolr.error(err); // should be ignored
}

System Info

System:
    OS: Linux 6.6 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat)
    CPU: (32) x64 AMD Ryzen 9 5950X 16-Core Processor
    Memory: 19.51 GB / 31.34 GB
    Container: Yes
    Shell: 5.2.21 - /bin/bash
  Binaries:
    Node: 24.11.1 - /usr/bin/node
    npm: 11.6.2 - /usr/bin/npm
    pnpm: 10.22.0 - /usr/bin/pnpm
    bun: 1.0.0 - /home/kriese/bin/bun
    Deno: 2.0.4 - /home/kriese/.deno/bin/deno
  npmPackages:
    @vitest/coverage-v8: 4.0.10 => 4.0.10 
    @vitest/eslint-plugin: 1.4.3 => 1.4.3 
    rolldown-vite:  7.2.7 
    vitest: 4.0.10 => 4.0.10 
    vitest-mock-extended: 3.1.0 => 3.1.0

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    feat: coverageIssues and PRs related to the coverage featureupstream

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions