IQSS / IQSS/dataverse-client-javascript

Fix branch test coverage in classes with 0% coverage and restore branch expected coverage back to 95%

Open
#186 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug GREI Re-arch Size: 10
Dominant language
TypeScript
Stars
20
Forks
11
Avg merge
2d 5h
Merged PRs (30d)
1

Description

The pre-commit hook was failing because it expected 95% branch coverage, but certain classes (GetCollection and GetCollectionFacets) were showing 0% branch coverage, even though we have test cases that should cover these branches.

To temporarily resolve this issue, we lowered the required branch coverage to 90% for the pre-commit hook to pass. However, we need to investigate the cause of this discrepancy, fix the issue, and restore the required branch coverage back to 95%

Screenshot 2024-09-03 at 12 22 19

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the pre-commit hook's branch-coverage configuration and inspect the GetCollection and GetCollectionFacets classes alongside their existing test cases. Reproduce the reported 0% branch coverage, identify why those branches are not counted, and verify that the hook passes after the required branch coverage is restored to 95%.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing-qa, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.