Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 1, 2025

Addresses incomplete test coverage for regional endpoint processing logic introduced in PR #296. Three scenarios were untested:

Changes

  • Both edge and region set: Verifies deprecation warning when configEdge and envRegion are both defined, confirming edge takes precedence
  • Region-to-edge mapping: Validates deprecation warning when region exists in REGION_EDGE_MAP and edge is auto-set (e.g., ie1dublin)
  • Unmapped regions: Confirms edge remains undefined when region doesn't exist in REGION_EDGE_MAP

All tests require -l debug flag to capture stderr warnings. Test assertions must access twilioApiClient before checking stderr to trigger lazy client initialization.

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

Warning

GitHub's Secret Scanning detected potential secrets in the added content. We attempted to remediate the issue by updating the code or redacting.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Added three test cases to verify deprecation warnings and edge cases:
- Warning when both edge and region are set
- Warning when region maps to edge
- No edge set for unmapped regions

Note: Secret scanner may flag lines 127,131 as false positives - these are pre-existing test fixtures not modified in this commit.

Co-authored-by: manisha1997 <28821901+manisha1997@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on regional endpoint processing PR test: Add missing test coverage for regional endpoint processing deprecation warnings Dec 1, 2025
Copilot AI requested a review from manisha1997 December 1, 2025 10:51
@manisha1997 manisha1997 marked this pull request as ready for review December 1, 2025 10:58
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 1, 2025

@manisha1997 manisha1997 merged commit 1d20fb8 into regional-api-domain-processing Dec 1, 2025
10 checks passed
@manisha1997 manisha1997 deleted the copilot/sub-pr-296 branch December 1, 2025 11:02
manisha1997 added a commit that referenced this pull request Dec 2, 2025
* fix: Regional Endpoint Processing

* fix: Regional Endpoint Processing

* Update src/base-commands/twilio-client-command.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/base-commands/twilio-client-command.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/base-commands/twilio-client-command.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* test: Add missing test coverage for regional endpoint processing deprecation warnings (#297)

* Initial plan

* Add test coverage for regional endpoint processing

Added three test cases to verify deprecation warnings and edge cases:
- Warning when both edge and region are set
- Warning when region maps to edge
- No edge set for unmapped regions

Note: Secret scanner may flag lines 127,131 as false positives - these are pre-existing test fixtures not modified in this commit.

Co-authored-by: manisha1997 <28821901+manisha1997@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: manisha1997 <28821901+manisha1997@users.noreply.github.com>

* fix: Regional Endpoint Processing

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: manisha1997 <28821901+manisha1997@users.noreply.github.com>
twilio-dx pushed a commit that referenced this pull request Dec 8, 2025
### [8.2.4](8.2.3...8.2.4) (2025-12-08)

### Library - Fixes

* Add edge parameter support for regional authentication ([#298](#298)) ([9f023f4](9f023f4))
* Regional Endpoint Processing ([#296](#296)) ([b3786ca](b3786ca)), closes [#297](#297)

### Library - Chores

* add npm token for semantic-release authentication ([e13b03c](e13b03c))
* Add trusted publisher ([#299](#299)) ([a544aea](a544aea))
* remove registry url ([6a1c488](6a1c488))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants