From 136d1666ada725ecb64de6d1370c59f64ef0da18 Mon Sep 17 00:00:00 2001 From: armandocomellas1 Date: Tue, 30 Jan 2024 21:08:12 -0600 Subject: [PATCH] add an unit test to check if those are theres Signed-off-by: armandocomellas1 --- .../src/cluster-locator/GkeClusterLocator.test.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/kubernetes-backend/src/cluster-locator/GkeClusterLocator.test.ts b/plugins/kubernetes-backend/src/cluster-locator/GkeClusterLocator.test.ts index ba46e03ae2..6b06fd26a2 100644 --- a/plugins/kubernetes-backend/src/cluster-locator/GkeClusterLocator.test.ts +++ b/plugins/kubernetes-backend/src/cluster-locator/GkeClusterLocator.test.ts @@ -497,10 +497,9 @@ describe('GkeClusterLocator', () => { configs, refreshIntervals, ); - const getKeyName = getHeaders.client._opts.hasOwnProperty(['libName']); - const getKeyVersion = getHeaders.client._opts.hasOwnProperty([ - 'libVersion', - ]); + const getClientMethod = getHeaders.client._opts; + const getKeyName = getClientMethod.hasOwnProperty('libName'); + const getKeyVersion = getClientMethod.hasOwnProperty('libVersion'); expect(getKeyName).toBe(true); expect(getKeyVersion).toBe(true); });