From 0753db15fe1ca2caf4602e7b7aa0080d1be35df1 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Mon, 9 May 2022 13:20:05 +0200 Subject: [PATCH] fix tests --- __tests__/finder.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/__tests__/finder.test.ts b/__tests__/finder.test.ts index c138b5a5..862f44e9 100644 --- a/__tests__/finder.test.ts +++ b/__tests__/finder.test.ts @@ -109,6 +109,9 @@ describe('Finder tests', () => { // 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'); infoSpy.mockImplementation(() => {}); @@ -147,7 +150,7 @@ describe('Finder tests', () => { 'Version 1.2.3 is available for downloading' ); expect(installSpy).toHaveBeenCalled(); - expect(cnSpy).toHaveBeenCalledWith(`::add-path::${expPath}${os.EOL}`); + expect(addPathSpy).toHaveBeenCalledWith(expPath); }); it('Errors if Python is not installed', async () => {