From c773bf210d0d59eb2adb068f7a3219e1f68c7b06 Mon Sep 17 00:00:00 2001 From: boxofyellow <54955040+boxofyellow@users.noreply.github.com> Date: Thu, 25 Jan 2024 13:56:29 -0800 Subject: [PATCH] fix lint errors --- __tests__/ghcr-client.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/__tests__/ghcr-client.test.ts b/__tests__/ghcr-client.test.ts index 19ff95d..71d4a2e 100644 --- a/__tests__/ghcr-client.test.ts +++ b/__tests__/ghcr-client.test.ts @@ -189,7 +189,7 @@ describe('publishOCIArtifact', () => { it('skips uploading layer blobs that already exist', async () => { // Simulate some blobs already existing - var count = 0 + let count = 0 axiosHeadMock.mockImplementation(async (url, config) => { count++ if (count === 1) { @@ -542,6 +542,8 @@ function validateRequestConfig(status: number, url: string, config: any): void { function cloneLayers(layers: ociContainer.Layer[]): ociContainer.Layer[] { const result: ociContainer.Layer[] = [] - layers.forEach(val => result.push({ ...val })) // this is _NOT_ a deep clone + for (const layer of layers) { + result.push({ ...layer }) // this is _NOT_ a deep clone + } return result }