fix: NO_PROXY env var no longer be respected over npm_config_noproxy env var (#8295)

Co-authored-by: Zach Bloomquist <github@chary.us>
This commit is contained in:
Jennifer Shehane
2020-08-25 01:48:11 +06:30
committed by GitHub
parent 0777f969f7
commit eac7859fcc
6 changed files with 20 additions and 5 deletions
@@ -229,8 +229,13 @@ describe('Proxy', () => {
context('with an upstream proxy', () => {
beforeEach(function () {
// PROXY vars should override npm_config vars, so set them to cause failures if they are used
// @see https://github.com/cypress-io/cypress/pull/8295
process.env.npm_config_proxy = process.env.npm_config_https_proxy = 'http://erroneously-used-npm-proxy.invalid'
process.env.npm_config_noproxy = 'just,some,nonsense'
process.env.NO_PROXY = ''
process.env.HTTP_PROXY = (process.env.HTTPS_PROXY = 'http://localhost:9001')
process.env.HTTP_PROXY = process.env.HTTPS_PROXY = 'http://localhost:9001'
this.upstream = new DebugProxy({
keepRequests: true,