fix for promise
This commit is contained in:
@ -223,8 +223,7 @@ describe('Testing all functions.', () => {
|
|||||||
jest.spyOn(arc,'sleep').mockImplementation();
|
jest.spyOn(arc,'sleep').mockImplementation();
|
||||||
jest.spyOn(fs, 'chmodSync').mockImplementation(() => {});
|
jest.spyOn(fs, 'chmodSync').mockImplementation(() => {});
|
||||||
jest.spyOn(core, 'exportVariable').mockImplementation(() => {});
|
jest.spyOn(core, 'exportVariable').mockImplementation(() => {});
|
||||||
const getArcKubeconfigMock = jest.fn(arc.getArcKubeconfig);
|
return arc.getArcKubeconfig().then(()=>{
|
||||||
getArcKubeconfigMock();
|
|
||||||
expect(core.getInput).toBeCalledTimes(4);
|
expect(core.getInput).toBeCalledTimes(4);
|
||||||
expect(io.which).toHaveBeenCalledWith("az",true);
|
expect(io.which).toHaveBeenCalledWith("az",true);
|
||||||
expect(arc.executeAzCliCommand).toHaveBeenNthCalledWith(1,`account show`, false);
|
expect(arc.executeAzCliCommand).toHaveBeenNthCalledWith(1,`account show`, false);
|
||||||
@ -238,5 +237,6 @@ describe('Testing all functions.', () => {
|
|||||||
expect(arc.sleep).toBeCalled();
|
expect(arc.sleep).toBeCalled();
|
||||||
expect(fs.chmodSync).toHaveBeenCalledWith(path.join('tempDirPath', 'kubeconfig_1234561234567'), '600');
|
expect(fs.chmodSync).toHaveBeenCalledWith(path.join('tempDirPath', 'kubeconfig_1234561234567'), '600');
|
||||||
expect(core.exportVariable).toHaveBeenCalledWith('KUBECONFIG', path.join('tempDirPath', 'kubeconfig_1234561234567'));
|
expect(core.exportVariable).toHaveBeenCalledWith('KUBECONFIG', path.join('tempDirPath', 'kubeconfig_1234561234567'));
|
||||||
|
});
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user