Code coverage tooling that support ignore next ignore hint need code transforms to preserve comments between catch(param) { in order to be able to ignore catch block's body.
catch (err) /* v8 ignore next */ {
// instructs coverage tooling ^
// to ignore this BlockStatement ^
Input:
try {
console.log('test');
}
catch (err) /* v8 ignore next */ {
console.error(err);
}
Expected output:
try {
console.log('test');
}
catch (err) /* v8 ignore next */ {
console.error(err);
}
Actual output:
try {
console.log('test');
}
catch (err) {
console.error(err);
}
https://playground.oxc.rs/#eNptU01v2...
Initial coverage ignore hint support added in:
Downstream Vitest issue:
Code coverage tooling that support
ignore nextignore hint need code transforms to preserve comments betweencatch(param) {in order to be able to ignorecatchblock's body.Input:
Expected output:
Actual output:
https://playground.oxc.rs/#eNptU01v2...
Initial coverage ignore hint support added in:
Downstream Vitest issue:
v8 ignore nextdoesn't ignore catch block withrolldown-vitevitest-dev/vitest#9094