Skip to content

Commit 984a372

Browse files
committed
fix proxy tests
1 parent 0f5694e commit 984a372

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/config_test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ describe('KubeConfig', () => {
396396
expect(rc.getAgent()).to.be.instanceOf(HttpsProxyAgent);
397397
const agent = rc.getAgent() as HttpsProxyAgent;
398398
expect(agent.options.ca?.toString()).to.equal(expectedCA.toString());
399-
expect(agent.proxy.href).to.equal(expectedProxyHref);
399+
expect((agent as any).proxy.href).to.equal(expectedProxyHref);
400400
});
401401
it('should apply http proxy', async () => {
402402
const kc = new KubeConfig();
@@ -412,8 +412,8 @@ describe('KubeConfig', () => {
412412

413413
expect(rc.getAgent()).to.be.instanceOf(HttpProxyAgent);
414414
const agent = rc.getAgent() as HttpProxyAgent;
415-
expect(agent.options.ca?.toString()).to.equal(expectedCA.toString());
416-
expect(agent.proxy.href).to.equal(expectedProxyHref);
415+
expect((agent as any).options.ca?.toString()).to.equal(expectedCA.toString());
416+
expect((agent as any).proxy.href).to.equal(expectedProxyHref);
417417
});
418418
it('should throw an error if proxy-url is provided but the server protocol is not http or https', async () => {
419419
const kc = new KubeConfig();

0 commit comments

Comments
 (0)