diff --git a/.github/scripts/generate_tags.js b/.github/scripts/generate_tags.js index 8ec3a9a3..53ffd821 100644 --- a/.github/scripts/generate_tags.js +++ b/.github/scripts/generate_tags.js @@ -43,4 +43,4 @@ core.info(`Updating ${jsonPath}`); updateJson().then((jsonString) => { fs.writeFileSync(jsonPath, jsonString) -}) +}); diff --git a/src/builder/__tests__/builder.test.ts b/src/builder/__tests__/builder.test.ts index 39c77349..f988a654 100644 --- a/src/builder/__tests__/builder.test.ts +++ b/src/builder/__tests__/builder.test.ts @@ -302,7 +302,7 @@ describe('class Builder', () => { try { await builder['prepareSources'](); } catch (error) { - null; + /* nop */ } expect(mockedTc.downloadTool).toBeCalledWith('zipballUrl'); @@ -317,7 +317,7 @@ describe('class Builder', () => { try { await builder['prepareSources'](); } catch (error) { - null; + /* nop */ } expect(mockedTc.extractZip).toBeCalledWith('downloadPath'); @@ -332,7 +332,7 @@ describe('class Builder', () => { try { await builder['prepareSources'](); } catch (error) { - null; + /* nop */ } expect(mockedIo.rmRF).toBeCalledWith('downloadPath'); diff --git a/src/builder/__tests__/builders.fixtures.ts b/src/builder/__tests__/builders.fixtures.ts index 8397194a..711b153b 100644 --- a/src/builder/__tests__/builders.fixtures.ts +++ b/src/builder/__tests__/builders.fixtures.ts @@ -127,10 +127,8 @@ export async function mockToolkit( mockedIo.rmRF.mockImplementation(async inputPath => { interactionVector.push(`Recursively remove path ${inputPath}`); }); - mockedIo.cp.mockImplementation(async (source, dest, options) => { - if (!options) { - options = {}; - } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + mockedIo.cp.mockImplementation(async (source, dest, _options) => { interactionVector.push(`Copy folder ${source} to ${dest}`); }); mockedIo.mkdirP.mockImplementation(async fsPath => { @@ -185,7 +183,7 @@ export async function mockToolkit( if (!options) { options = {}; } - if (options && options.listeners && options.listeners.stdout) { + if (options.listeners && options.listeners.stdout) { options.listeners.stdout(Buffer.from(`${command} ${args.join(' ')}`)); } interactionVector.push(`Execute command "${command} ${args.join(' ')}"`); diff --git a/src/builder/__tests__/darwin.test.ts b/src/builder/__tests__/darwin.test.ts index 04ce9768..cf6e4739 100644 --- a/src/builder/__tests__/darwin.test.ts +++ b/src/builder/__tests__/darwin.test.ts @@ -55,7 +55,7 @@ describe.each(getTags())( try { await builder.build(); } catch (error) { - null; + /* nop */ } expect(mockedTc.downloadTool).toBeCalledWith(zipBall); diff --git a/src/builder/__tests__/linux.test.ts b/src/builder/__tests__/linux.test.ts index b716a4f3..68f8a1a9 100644 --- a/src/builder/__tests__/linux.test.ts +++ b/src/builder/__tests__/linux.test.ts @@ -55,7 +55,7 @@ describe.each(getTags())( try { await builder.build(); } catch (error) { - null; + /* nop */ } expect(mockedTc.downloadTool).toBeCalledWith(zipBall); diff --git a/src/builder/__tests__/windows.test.ts b/src/builder/__tests__/windows.test.ts index d8226303..f38c0192 100644 --- a/src/builder/__tests__/windows.test.ts +++ b/src/builder/__tests__/windows.test.ts @@ -59,7 +59,7 @@ describe.each(getTags())( try { await builder.build(); } catch (error) { - null; + /* nop */ } expect(mockedTc.downloadTool).toBeCalledWith(zipBall);