fix tests

This commit is contained in:
Dmitry Shibanov 2022-05-09 13:20:05 +02:00
parent 0c0e574755
commit 0753db15fe

View file

@ -109,6 +109,9 @@ describe('Finder tests', () => {
// process.stderr.write('write:' + line + '\n'); // process.stderr.write('write:' + line + '\n');
}); });
const addPathSpy: jest.SpyInstance = jest.spyOn(core, 'addPath');
addPathSpy.mockImplementation(() => null);
const infoSpy: jest.SpyInstance = jest.spyOn(core, 'info'); const infoSpy: jest.SpyInstance = jest.spyOn(core, 'info');
infoSpy.mockImplementation(() => {}); infoSpy.mockImplementation(() => {});
@ -147,7 +150,7 @@ describe('Finder tests', () => {
'Version 1.2.3 is available for downloading' 'Version 1.2.3 is available for downloading'
); );
expect(installSpy).toHaveBeenCalled(); expect(installSpy).toHaveBeenCalled();
expect(cnSpy).toHaveBeenCalledWith(`::add-path::${expPath}${os.EOL}`); expect(addPathSpy).toHaveBeenCalledWith(expPath);
}); });
it('Errors if Python is not installed', async () => { it('Errors if Python is not installed', async () => {