Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

test: improve patch coverage for PR #52 - #57

Merged
BYK merged 2 commits into
mainfrom
fix/patch-coverage-pr52
Jan 23, 2026
Merged

BYK merged 2 commits into
mainfrom
fix/patch-coverage-pr52

Conversation

@BYK

@BYK BYK commented Jan 23, 2026

Copy link
Copy Markdown
Member

Summary

Adds missing tests to achieve 100% patch coverage for the changes introduced in PR #52 (workspace-scoped alias caching).

Tests Added

test/lib/config.test.ts

  • getCachedProject / setCachedProject / clearProjectCache - project cache by orgId:projectId
  • getConfigPath - returns the config file path

test/lib/dsn.test.ts

  • createDetectedDsn - creates DetectedDsn from valid/invalid DSN strings
  • inferPackagePath - infers package paths from monorepo directory patterns (packages/, apps/, libs/, modules/, services/)

Coverage Improvement

File Before After
src/lib/config.ts 86.01% 97.11%
src/lib/dsn/parser.ts 94.52% 98.63%

Add missing tests for functions introduced in the workspace-scoped
alias caching feature:

- getCachedProject / setCachedProject / clearProjectCache
- getConfigPath
- createDetectedDsn with invalid DSN
- inferPackagePath for various monorepo patterns

This brings patch coverage to 100% for the changes in PR #52.
@BYK
BYK enabled auto-merge (squash) January 23, 2026 17:59
@github-actions

github-actions Bot commented Jan 23, 2026 •

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

⚪ None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ Patch coverage is 100.00%. Project has 1534 uncovered lines.
✅ Project coverage is 55.92%. Comparing base (base) to head (head).

Files with missing lines (18)
File Patch % Lines
human.ts 9.42% ⚠️ 731 Missing
oauth.ts 21.71% ⚠️ 202 Missing
api-client.ts 46.98% ⚠️ 123 Missing
resolver.ts 3.23% ⚠️ 120 Missing
errors.ts 5.94% ⚠️ 95 Missing
fixture.ts 28.74% ⚠️ 62 Missing
api.ts 66.30% ⚠️ 61 Missing
errors.ts 51.61% ⚠️ 60 Missing
preload.ts 39.02% ⚠️ 25 Missing
detector.ts 87.79% ⚠️ 16 Missing
cache.ts 76.27% ⚠️ 14 Missing
config.ts 97.11% ⚠️ 7 Missing
colors.ts 85.42% ⚠️ 7 Missing
index.ts 95.06% ⚠️ 4 Missing
env-file.ts 97.17% ⚠️ 3 Missing
alias.ts 96.43% ⚠️ 2 Missing
java.ts 97.22% ⚠️ 1 Missing
parser.ts 98.63% ⚠️ 1 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    55.07%    55.92%    +0.85%
==========================================
  Files           33        33         —
  Lines         3481      3480        -1
  Branches         0         0         —
==========================================
+ Hits          1917      1946       +29
- Misses        1564      1534       -30
- Partials         0         0         —

Generated by Codecov Action

@BYK
BYK merged commit 59d3ee1 into main Jan 23, 2026
15 checks passed
@BYK
BYK deleted the fix/patch-coverage-pr52 branch January 23, 2026 18:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant