This commit is contained in:
Atharva Mulmuley 2021-06-03 13:20:28 +05:30
parent e8b22d0c21
commit 604e767536

View File

@ -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);