From 613ceb17c881052132b4ff9e6cc3aaf2f15ce893 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 1 Aug 2022 16:35:19 +0200 Subject: [PATCH] fix test? --- __tests__/installer.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/__tests__/installer.test.ts b/__tests__/installer.test.ts index 581af8ac3..755ee03d3 100644 --- a/__tests__/installer.test.ts +++ b/__tests__/installer.test.ts @@ -388,10 +388,12 @@ describe('setup-node', () => { inputs['node-version'] = '12'; inputs['corepack'] = 'true'; + const toolPath = path.normalize('/cache/node/12.16.1/x64'); + findSpy.mockReturnValue(toolPath); await main.run(); // It seems to call it with the absolute path to corepack, so we easily use `toHaveBeenCalledWith` - expect(cnSpy.mock.calls[2][0]).toContain('corepack enable'); + expect(cnSpy.mock.calls[3][0]).toContain('corepack enable'); }); describe('check-latest flag', () => {