Code coverage off by 2 lines in components with co-located template
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- testing-qa
Research direction
Start with a coverage report for a component with a co-located template and compare it with the generated source described here. Use related pull requests #558 and #763 for context. Done means the injected import and template constant no longer shift reported source lines or count as source coverage.
Written by the indexing model from the issue text.
Description
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 https://github.com/ember-cli/ember-cli-htmlbars/pull/558 and https://github.com/ember-cli/ember-cli-htmlbars/pull/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 😄)
- Dominant language
- JavaScript
- Stars
- 77
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ember-cli/ember-cli-htmlbars
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
ember-cli/ember-cli-htmlbars#792 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ember-cli/ember-cli-htmlbars#787 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
ember-cli/ember-cli-htmlbars#781 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ember-cli/ember-cli-htmlbars#774 · 2 comments ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 30/100
ember-cli/ember-cli-htmlbars#753 · 1 comment · 1 reaction ·
All issues in ember-cli/ember-cli-htmlbars
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
palladius/rails8-app-on-gcp#145 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
dotenvx/dotenv-vscode#139 ·
-
test-change-proposal
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
web-platform-tests/interop#1455 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
corsairdev/corsair#1764 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100