@@ -152,20 +152,25 @@ function spawnPromisified(...args) {
152152}
153153
154154function spawnOptions ( envExtension ) {
155- /*
156- * Cleanup the environment to not interfere with the client proxy tests.
157- */
158- const { http_proxy, https_proxy, HTTP_PROXY , HTTPS_PROXY ,
159- no_proxy, NO_PROXY , ...env } = process . env ;
160- return { env : { ...env , ...envExtension } } ;
155+ // Cleanup the environment to not interfere with the client proxy tests.
156+ const {
157+ http_proxy : _http_proxy ,
158+ https_proxy : _https_proxy ,
159+ HTTP_PROXY : _HTTP_PROXY ,
160+ HTTPS_PROXY : _HTTPS_PROXY ,
161+ no_proxy : _no_proxy ,
162+ NO_PROXY : _NO_PROXY ,
163+ ...env
164+ } = process . env ;
165+ return { env : { ...env , ...envExtension } } ;
161166}
162167
163168async function checkProxied ( type , envExtension , expectation , cliArgsExtension = [ ] ) {
164169 const script = type === 'fetch' ? fixtures . path ( 'fetch-and-log.mjs' ) : fixtures . path ( 'request-and-log.js' ) ;
165170 const { code, signal, stdout, stderr } = await spawnPromisified (
166171 process . execPath ,
167172 [ ...cliArgsExtension , script ] ,
168- spawnOptions ( { ...envExtension , NO_LOG_REQUEST : '1' } ) ) ;
173+ spawnOptions ( { ...envExtension , NO_LOG_REQUEST : '1' } ) ) ;
169174
170175 assert . deepStrictEqual ( {
171176 stderr : stderr . trim ( ) ,
0 commit comments