@@ -109,13 +109,16 @@ describe("parseOrgProjectArg", () => {
109109 } ) ;
110110 } ) ;
111111
112- // URL integration tests — applySentryUrlContext may set SENTRY_URL as a side effect
112+ // URL integration tests — applySentryUrlContext may set SENTRY_HOST/ SENTRY_URL as a side effect
113113 describe ( "Sentry URL inputs" , ( ) => {
114114 let savedSentryUrl : string | undefined ;
115+ let savedSentryHost : string | undefined ;
115116
116117 beforeEach ( ( ) => {
117118 savedSentryUrl = process . env . SENTRY_URL ;
119+ savedSentryHost = process . env . SENTRY_HOST ;
118120 delete process . env . SENTRY_URL ;
121+ delete process . env . SENTRY_HOST ;
119122 } ) ;
120123
121124 afterEach ( ( ) => {
@@ -124,6 +127,11 @@ describe("parseOrgProjectArg", () => {
124127 } else {
125128 delete process . env . SENTRY_URL ;
126129 }
130+ if ( savedSentryHost !== undefined ) {
131+ process . env . SENTRY_HOST = savedSentryHost ;
132+ } else {
133+ delete process . env . SENTRY_HOST ;
134+ }
127135 } ) ;
128136
129137 test ( "issue URL returns org-all" , ( ) => {
@@ -228,13 +236,16 @@ describe("parseIssueArg", () => {
228236 } ) ;
229237 } ) ;
230238
231- // URL integration tests — applySentryUrlContext may set SENTRY_URL as a side effect
239+ // URL integration tests — applySentryUrlContext may set SENTRY_HOST/ SENTRY_URL as a side effect
232240 describe ( "Sentry URL inputs" , ( ) => {
233241 let savedSentryUrl : string | undefined ;
242+ let savedSentryHost : string | undefined ;
234243
235244 beforeEach ( ( ) => {
236245 savedSentryUrl = process . env . SENTRY_URL ;
246+ savedSentryHost = process . env . SENTRY_HOST ;
237247 delete process . env . SENTRY_URL ;
248+ delete process . env . SENTRY_HOST ;
238249 } ) ;
239250
240251 afterEach ( ( ) => {
@@ -243,6 +254,11 @@ describe("parseIssueArg", () => {
243254 } else {
244255 delete process . env . SENTRY_URL ;
245256 }
257+ if ( savedSentryHost !== undefined ) {
258+ process . env . SENTRY_HOST = savedSentryHost ;
259+ } else {
260+ delete process . env . SENTRY_HOST ;
261+ }
246262 } ) ;
247263
248264 test ( "issue URL with numeric ID returns explicit-org-numeric" , ( ) => {
0 commit comments