test(cloud): improve coverage for utils.ts and config.ts#3
Open
easonLiangWorldedtech wants to merge 2 commits into
Open
test(cloud): improve coverage for utils.ts and config.ts#3easonLiangWorldedtech wants to merge 2 commits into
easonLiangWorldedtech wants to merge 2 commits into
Conversation
- Add 5 tests for getUserAgent() in utils.spec.ts covering all code paths (no context, valid version, missing version, undefined extension) - Add 6 tests for getClerkBaseUrl() and getRooCodeApiUrl() in config.spec.ts covering env var overrides and fallback behavior This brings coverage on previously uncovered files: - utils.ts: FNF 0->1 (getUserAgent now covered) - config.ts: FNF 2->2 with both functions tested
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
This PR improves test coverage in
packages/cloudby adding tests for previously uncovered files.Changes
**Added
utils.spec.ts\** — 5 tests coveringgetUserAgent()`:packageJSON.versionpackageJSON.versionfieldextensionobjectpackageJSONobject**Added
config.spec.ts\** — 6 tests coveringgetClerkBaseUrl()andgetRooCodeApiUrl()`:CLERK_BASE_URL/ROO_CODE_API_URLenv varsCoverage Impact
Tests