You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In components with a co-located template, the plugin adds import { hbs } and const __COLOCATED_TEMPLATE__ = ... to the source file, and that is affecting the code coverage. Not only does this affect the percentage itself, as const __COLOCATED_TEMPLATE__ = ... is seen as a line that is covered without it being part of the source code, it also makes it very difficult to look at a coverage report as the lines are off by 2 (see screenshot)
In #558 and #763, something similar is addressed, but then just for source maps which appeared to be resolved without the fixes. However, for the code coverage this is still relevant, and placing the lines at the end would at least solve the off-by-2 issues (would have been fun if it was the typical off-by-1 error 😄)
The text was updated successfully, but these errors were encountered:
Code coverage tools generally use the source maps as well, so fixing those should resolve the coverage issues. Indeed, that's my primary motivation to fix this.
In components with a co-located template, the plugin adds
import { hbs }
andconst __COLOCATED_TEMPLATE__ = ...
to the source file, and that is affecting the code coverage. Not only does this affect the percentage itself, asconst __COLOCATED_TEMPLATE__ = ...
is seen as a line that is covered without it being part of the source code, it also makes it very difficult to look at a coverage report as the lines are off by 2 (see screenshot)In #558 and #763, something similar is addressed, but then just for source maps which appeared to be resolved without the fixes. However, for the code coverage this is still relevant, and placing the lines at the end would at least solve the off-by-2 issues (would have been fun if it was the typical off-by-1 error 😄)
The text was updated successfully, but these errors were encountered: