From 98e1a813dbc18a10ff203e344744cc71362c9303 Mon Sep 17 00:00:00 2001 From: Vallie Joseph Date: Thu, 21 Dec 2023 20:22:20 +0000 Subject: [PATCH] testing ci --- package.json | 2 +- .../__tests__/download-artifact.test.ts | 24 +++++++------------ 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 73a7093c..01566f9e 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "lint": "eslint packages/**/*.ts", "lint-fix": "eslint packages/**/*.ts --fix", "new-package": "scripts/create-package", - "test": "jest --testTimeout 10000" + "test": "jest --testTimeout 20000" }, "devDependencies": { "@types/jest": "^29.5.4", diff --git a/packages/artifact/__tests__/download-artifact.test.ts b/packages/artifact/__tests__/download-artifact.test.ts index 37c1aa5e..bd59dfd2 100644 --- a/packages/artifact/__tests__/download-artifact.test.ts +++ b/packages/artifact/__tests__/download-artifact.test.ts @@ -295,13 +295,14 @@ describe('download-artifact', () => { } ) - await downloadArtifactPublic( - fixtures.artifactID, - fixtures.repositoryOwner, - fixtures.repositoryName, - fixtures.token - ) - + await expect( + downloadArtifactPublic( + fixtures.artifactID, + fixtures.repositoryOwner, + fixtures.repositoryName, + fixtures.token + ) + ).rejects.toBeInstanceOf(Error) // jest.runAllTimers() expect(downloadArtifactMock).toHaveBeenCalledWith({ @@ -313,15 +314,6 @@ describe('download-artifact', () => { redirect: 'manual' } }) - // expect(mockHttpClient).toHaveBeenCalledWith(getUserAgentString()) - await expect( - downloadArtifactPublic( - fixtures.artifactID, - fixtures.repositoryOwner, - fixtures.repositoryName, - fixtures.token - ) - ).rejects.toBeInstanceOf(Error) }, 40000) it('should fail if blob storage response is non-200 after 5 retries', async () => { const downloadArtifactMock = github.getOctokit(fixtures.token).rest