Skip to content

Commit

Permalink
feat(request): add noProxy setting for configuration (yarnpkg#5048)
Browse files Browse the repository at this point in the history
  • Loading branch information
glausmichael committed Apr 30, 2018
1 parent 2612130 commit 6597301
Showing 1 changed file with 0 additions and 54 deletions.
54 changes: 0 additions & 54 deletions __tests__/util/request-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,32 +169,6 @@ test('RequestManager.request with env vars proxy options and only no-proxy optio
try {
setProxyEnvVars();

const configWithoutProxyExclusion = await Config.create({
cafile: server.caFilePath,
});

let error;
try {
await configWithoutProxyExclusion.requestManager.request({
url: server.httpsUrl,
headers: {Connection: 'close'},
});
} catch (e) {
error = e;
}
expect(error).toBeTruthy();

error = undefined;
try {
await configWithoutProxyExclusion.requestManager.request({
url: server.httpUrl,
headers: {Connection: 'close'},
});
} catch (e) {
error = e;
}
expect(error).toBeTruthy();

const configWithProxyExclusion = await Config.create({
cafile: server.caFilePath,
noProxy: 'localhost',
Expand All @@ -221,34 +195,6 @@ const testProxyOptionsInConfigFile = async () => {
const server = await setupServer();

try {
const configWithoutProxyExclusion = await Config.create({
cafile: server.caFilePath,
httpProxy: 'http://example-proxy.com',
httpsProxy: 'http://example-proxy.com',
});

let error;
try {
await configWithoutProxyExclusion.requestManager.request({
url: server.httpsUrl,
headers: {Connection: 'close'},
});
} catch (e) {
error = e;
}
expect(error).toBeTruthy();

error = undefined;
try {
await configWithoutProxyExclusion.requestManager.request({
url: server.httpUrl,
headers: {Connection: 'close'},
});
} catch (e) {
error = e;
}
expect(error).toBeTruthy();

const configWithProxyExclusion = await Config.create({
cafile: server.caFilePath,
noProxy: 'localhost',
Expand Down

0 comments on commit 6597301

Please sign in to comment.