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
Describe the bug
v8 ignore nextdoesn't have an effect on the catch blockReproduction
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.0Used Package Manager
pnpm
Validations