Skip to content

Commit

Permalink
fix test?
Browse files Browse the repository at this point in the history
  • Loading branch information
beeequeue committed Aug 1, 2022
1 parent 6ed5816 commit 613ceb1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion __tests__/installer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit 613ceb1

Please sign in to comment.