From 604e767536e2427fcbc4c169ce5bc9a025c2d2e0 Mon Sep 17 00:00:00 2001 From: Atharva Mulmuley Date: Thu, 3 Jun 2021 13:20:28 +0530 Subject: [PATCH] fix --- __tests__/run.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/__tests__/run.test.ts b/__tests__/run.test.ts index 15b27d72..12b47c84 100644 --- a/__tests__/run.test.ts +++ b/__tests__/run.test.ts @@ -204,7 +204,7 @@ describe('Testing all functions.', () => { jest.spyOn(core, 'getInput').mockImplementation((inputName, options) => { if (inputName == 'cluster-type') return 'arc'; }); - expect(await run.run()); + expect(run.run()); expect(arc.getArcKubeconfig).toBeCalled(); }); @@ -223,7 +223,8 @@ describe('Testing all functions.', () => { jest.spyOn(arc,'sleep').mockImplementation(); jest.spyOn(fs, 'chmodSync').mockImplementation(() => {}); jest.spyOn(core, 'exportVariable').mockImplementation(() => {}); - await arc.getArcKubeconfig(); + const getArcKubeconfigMock = jest.fn(arc.getArcKubeconfig); + getArcKubeconfigMock(); expect(core.getInput).toBeCalledTimes(4); expect(io.which).toHaveBeenCalledWith("az",true); expect(arc.executeAzCliCommand).toHaveBeenNthCalledWith(1,`account show`, false);