From b1ef2feb1b3e3289acdf74c5e4df2ec1b0ffa42c Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 7 Oct 2022 21:00:37 +0200 Subject: [PATCH] add test --- __tests__/installer.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/__tests__/installer.test.ts b/__tests__/installer.test.ts index fc65dfbd0..630f4f119 100644 --- a/__tests__/installer.test.ts +++ b/__tests__/installer.test.ts @@ -402,6 +402,12 @@ describe('setup-node', () => { expect(execSpy).toHaveBeenCalledWith('corepack', ['enable']); }); + it('enables corepack with arguments if they are passed', async () => { + inputs['corepack'] = 'npm'; + await main.run(); + expect(execSpy).toHaveBeenCalledWith('corepack', ['enable', 'npm']); + }); + describe('check-latest flag', () => { it('use local version and dont check manifest if check-latest is not specified', async () => { os.platform = 'linux';