Conversation
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.
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
Contributor
Codecov Results 📊✅ Patch coverage is 100.00%. Project has 1534 uncovered lines. Files with missing lines (18)
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsgetCachedProject/setCachedProject/clearProjectCache- project cache by orgId:projectIdgetConfigPath- returns the config file pathtest/lib/dsn.test.tscreateDetectedDsn- creates DetectedDsn from valid/invalid DSN stringsinferPackagePath- infers package paths from monorepo directory patterns (packages/, apps/, libs/, modules/, services/)Coverage Improvement
src/lib/config.tssrc/lib/dsn/parser.ts