diff --git a/__tests__/buildx/bake.test.itg.ts b/__tests__/buildx/bake.test.itg.ts index c9b900d0..f4499f2b 100644 --- a/__tests__/buildx/bake.test.itg.ts +++ b/__tests__/buildx/bake.test.itg.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import {beforeEach, describe, expect, jest, test} from '@jest/globals'; +import {describe, expect, test} from '@jest/globals'; import * as fs from 'fs'; import * as path from 'path'; @@ -25,10 +25,6 @@ const fixturesDir = path.join(__dirname, '..', 'fixtures'); const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'true' && process.env.ImageOS && process.env.ImageOS.startsWith('ubuntu')) ? describe : describe.skip; -beforeEach(() => { - jest.clearAllMocks(); -}); - maybe('getDefinition', () => { // prettier-ignore test.each([ diff --git a/__tests__/buildx/history.test.itg.ts b/__tests__/buildx/history.test.itg.ts index 009056bc..78188c31 100644 --- a/__tests__/buildx/history.test.itg.ts +++ b/__tests__/buildx/history.test.itg.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import {beforeEach, describe, expect, jest, test} from '@jest/globals'; +import {describe, expect, test} from '@jest/globals'; import * as fs from 'fs'; import * as path from 'path'; @@ -31,10 +31,6 @@ const tmpDir = path.join(process.env.TEMP || '/tmp', 'buildx-history-jest'); const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'true' && process.env.ImageOS && process.env.ImageOS.startsWith('ubuntu')) ? describe : describe.skip; -beforeEach(() => { - jest.clearAllMocks(); -}); - maybe('exportBuild', () => { // prettier-ignore test.each([ diff --git a/__tests__/github.test.itg.ts b/__tests__/github.test.itg.ts index 852e0a67..2163a765 100644 --- a/__tests__/github.test.itg.ts +++ b/__tests__/github.test.itg.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import {beforeEach, describe, expect, it, jest, test} from '@jest/globals'; +import {describe, expect, it, test} from '@jest/globals'; import fs from 'fs'; import * as path from 'path'; @@ -32,10 +32,6 @@ const tmpDir = path.join(process.env.TEMP || '/tmp', 'github-jest'); const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'true' && process.env.ImageOS && process.env.ImageOS.startsWith('ubuntu')) ? describe : describe.skip; -beforeEach(() => { - jest.clearAllMocks(); -}); - maybe('uploadArtifact', () => { it('uploads an artifact', async () => { const res = await GitHub.uploadArtifact({ diff --git a/jest.config.itg.ts b/jest.config.itg.ts index 9628c493..35619db9 100644 --- a/jest.config.itg.ts +++ b/jest.config.itg.ts @@ -22,10 +22,6 @@ const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-actions-toolkit-')) process.env = Object.assign({}, process.env, { TEMP: tmpDir, - GITHUB_REPOSITORY: 'docker/actions-toolkit', - GITHUB_RUN_ATTEMPT: 2, - GITHUB_RUN_ID: 2188748038, - GITHUB_RUN_NUMBER: 15, RUNNER_TEMP: path.join(tmpDir, 'runner-temp'), RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache') }) as {