1
0
Files
setup-buildx-action/jest.config.js
T

30 lines
898 B
JavaScript
Raw Normal View History

2026-01-07 15:36:41 +01:00
/* eslint-disable @typescript-eslint/no-require-imports */
const fs = require('fs');
const os = require('os');
const path = require('path');
2023-02-19 02:12:29 +01:00
2026-01-07 15:36:41 +01:00
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-setup-buildx-action-'));
2023-02-19 02:12:29 +01:00
process.env = Object.assign({}, process.env, {
TEMP: tmpDir,
GITHUB_REPOSITORY: 'docker/setup-buildx-action',
2026-01-07 15:36:41 +01:00
RUNNER_TEMP: path.join(tmpDir, 'runner-temp'),
RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache')
});
2023-02-19 02:12:29 +01:00
module.exports = {
clearMocks: true,
2026-01-07 15:36:41 +01:00
testEnvironment: 'node',
moduleFileExtensions: ['js', 'ts'],
testMatch: ['**/*.test.ts'],
transform: {
'^.+\\.ts$': 'ts-jest'
},
2022-09-19 11:34:47 +02:00
moduleNameMapper: {
'^csv-parse/sync': '<rootDir>/node_modules/csv-parse/dist/cjs/sync.cjs'
},
2023-02-19 02:12:29 +01:00
collectCoverageFrom: ['src/**/{!(main.ts),}.ts'],
2026-01-07 15:36:41 +01:00
coveragePathIgnorePatterns: ['lib/', 'node_modules/', '__mocks__/', '__tests__/'],
2022-03-21 13:43:41 +01:00
verbose: true
2022-09-19 11:34:47 +02:00
};