You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* refactor: eliminate duplicate code patterns (#2673, #2674, #2675)
1. Extract shared jest.mock('execa') factory into test-helpers/mock-execa.test-utils.ts
and update 12 test files to use it (was copy-pasted verbatim in each).
2. Extract parseProviderBaseUrl() helper in copilot-api-resolver.ts to deduplicate
the 7-line URL normalization prologue shared by two functions.
3. Extract cache_and_unset_token() helper in one-shot-token.c to deduplicate the
18-line cache-store/unsetenv/log/mark-accessed tail in getenv and secure_getenv.
All tests pass. Build passes.
Closes#2673Closes#2674Closes#2675
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: unused mock imports, jest.mock require lint, strdup null check
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
0 commit comments