test(cli): raise line and branch coverage of commands/upgrade.ts (install and update area, ~27%)
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- bun, typescript
Research direction
Read cli/src/commands/upgrade.ts alongside cli/src/commands/__tests__/upgrade.test.ts, then check the existing helpers in cli/src/test-support. Add mocked unit tests for the error, no-op, and already-latest branches without network access or real installs. Run bun run test:coverage from cli/; done means line and branch coverage for the area rises, with the baseline updated only if the measured number moved.
Written by the indexing model from the issue text.
Description
🎃 Part of Hacktoberfest. Filled dot = merged, hollow dot = open. Click the map for all open hacktoberfest issues.
Part of epic #1551 (unit test coverage). The install and update area is the lowest in cli/coverage-baseline.json (27.46% lines, 20.35% branches). Start with cli/src/commands/upgrade.ts and the existing cli/src/commands/__tests__/upgrade.test.ts.
Done when
- New unit tests cover the error, no-op and already-latest branches in
upgrade.ts, using mocks (no network, no real package installs). bun run test:coverageincli/shows a higher line and branch number for the area. Raisecli/coverage-baseline.jsonin the same PR only if the number actually moved.- Follows the existing
__tests__patterns and the helpers incli/src/test-support.
Sign-off: git commit -s.
- Dominant language
- Starlark
- Stars
- 14
- Forks
- 3
- Avg merge
- 1h 6m
- Merged PRs (30d)
- 916
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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 tdk-landscape/tdk-cli-core
-
test(cli): unit tests for completion install paths (install and update area)Possibly taken @minutechreview claimed this today. Openarea: cli area: tests claimed coverage difficulty: easy good first issue hacktoberfest help wanted testing
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
tdk-landscape/tdk-cli-core#1664 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
tdk-landscape/tdk-cli-core#1658 ·
Maintainers usually reply within 1 day
-
docs: add examples of high-value unit tests to the test guidePossibly taken @Huang-404-Q claimed this today. Openarea: documentation contributing difficulty: easy documentation dx good first issue hacktoberfest help wanted island: Docs Harbor
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
tdk-landscape/tdk-cli-core#1612 ·
Maintainers usually reply within 1 day
-
area: cli area: tests contributing coverage difficulty: easy dx good first issue hacktoberfest help wanted island: Test Atoll testing
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
tdk-landscape/tdk-cli-core#1592 ·
Maintainers usually reply within 1 day
-
area: cli area: tests contributing coverage difficulty: easy dx good first issue help wanted island: Test Atoll testing
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
tdk-landscape/tdk-cli-core#1582 ·
Maintainers usually reply within 1 day
All issues in tdk-landscape/tdk-cli-core
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
huggingface/huggingface_hub#5210 ·
Maintainers usually reply within 1 day
-
plan lint: overclaim fires on every page linted without enrichment (regex matches inlined chrome.js)Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
plugins: symlinked plugin directories are skippedPossibly taken @lab1207 claimed this today. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
eugenioenko/ttt#1029 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
simkimsia/netlify-axi#19 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Edwin-metcalf/MetCode#24 ·
Maintainers usually reply within 1 day