From d965a53926c757a3ff54a22bc60664e574af3333 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Wed, 7 Jan 2026 15:36:41 +0100 Subject: [PATCH] update jest config since 30.0 Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- jest.config.ts => jest.config.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename jest.config.ts => jest.config.js (55%) diff --git a/jest.config.ts b/jest.config.js similarity index 55% rename from jest.config.ts rename to jest.config.js index 5a901df..2a2ea19 100644 --- a/jest.config.ts +++ b/jest.config.js @@ -1,20 +1,20 @@ -import fs from 'fs'; -import os from 'os'; -import path from 'path'; +/* eslint-disable @typescript-eslint/no-require-imports */ +const fs = require('fs'); +const os = require('os'); +const path = require('path'); -const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-setup-buildx-action-')).split(path.sep).join(path.posix.sep); +const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-setup-buildx-action-')); process.env = Object.assign({}, process.env, { TEMP: tmpDir, GITHUB_REPOSITORY: 'docker/setup-buildx-action', - RUNNER_TEMP: path.join(tmpDir, 'runner-temp').split(path.sep).join(path.posix.sep), - RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache').split(path.sep).join(path.posix.sep) -}) as { - [key: string]: string; -}; + RUNNER_TEMP: path.join(tmpDir, 'runner-temp'), + RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache') +}); module.exports = { clearMocks: true, + testEnvironment: 'node', moduleFileExtensions: ['js', 'ts'], testMatch: ['**/*.test.ts'], transform: { @@ -24,6 +24,6 @@ module.exports = { '^csv-parse/sync': '/node_modules/csv-parse/dist/cjs/sync.cjs' }, collectCoverageFrom: ['src/**/{!(main.ts),}.ts'], - coveragePathIgnorePatterns: ['lib/', 'node_modules/', '__tests__/'], + coveragePathIgnorePatterns: ['lib/', 'node_modules/', '__mocks__/', '__tests__/'], verbose: true };