From e749ed8aad03848cee9a8732b5de44c4fd4939ff Mon Sep 17 00:00:00 2001 From: armandocomellas1 Date: Tue, 30 Jan 2024 21:25:23 -0600 Subject: [PATCH] Private fn doesnt not allow acces method, change into expect unit test Signed-off-by: armandocomellas1 --- .../src/cluster-locator/GkeClusterLocator.test.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/kubernetes-backend/src/cluster-locator/GkeClusterLocator.test.ts b/plugins/kubernetes-backend/src/cluster-locator/GkeClusterLocator.test.ts index 6b06fd26a2..54b90b6033 100644 --- a/plugins/kubernetes-backend/src/cluster-locator/GkeClusterLocator.test.ts +++ b/plugins/kubernetes-backend/src/cluster-locator/GkeClusterLocator.test.ts @@ -497,11 +497,9 @@ describe('GkeClusterLocator', () => { configs, refreshIntervals, ); - const getClientMethod = getHeaders.client._opts; - const getKeyName = getClientMethod.hasOwnProperty('libName'); - const getKeyVersion = getClientMethod.hasOwnProperty('libVersion'); - expect(getKeyName).toBe(true); - expect(getKeyVersion).toBe(true); + + expect(getHeaders.client._opts).toHaveProperty('libName'); + expect(getHeaders.client._opts).toHaveProperty('libVersion'); }); }); });