[Bug]: Line under a decorator is not marked as covered in coverage report
Version
29.7.0
Steps to reproduce
- Create a decorator with JavaScript stage 3 decorator features. (No
experimentalDecoratorsoremitDecoratorMetadataneeded) - Add a test to decorated function
- Run the test with coverage report
Expected behavior
Coverage report should cover 100% of the code in every category
Actual behavior
Coverage report leave the line below the decorator as uncovered line.
Additional context
Repo where you can recreate this issue: https://github.com/srinesha/decorator-coverage-issue
Steps:
yarn installto install dependenciesyarn test:coverageto run test and generate the coverage report
Environment
System:
OS: Linux 6.6 NixOS 24.05 (Uakari) 24.05 (Uakari)
CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1255U
Binaries:
Node: 22.4.1 - /etc/profiles/per-user/s1n7ax/bin/node
Yarn: 1.22.22 - /etc/profiles/per-user/s1n7ax/bin/yarn
npm: 10.8.1 - /etc/profiles/per-user/s1n7ax/bin/npm
pnpm: 8.15.5 - /etc/profiles/per-user/s1n7ax/bin/pnpm
It seems it's a issue from transpiled decorator code. The first decorator could never be covered.
After checking the transpiled code coverage, the first property indeed has not been covered.
And there are 3 different processing for the properties:
It is the same issue after changing the order.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
having the same issue
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.