mirror of
https://github.com/docker/setup-docker-action.git
synced 2025-12-25 14:41:26 +01:00
30 lines
898 B
JavaScript
30 lines
898 B
JavaScript
/* 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-docker-action-'));
|
|
|
|
process.env = Object.assign({}, process.env, {
|
|
TEMP: tmpDir,
|
|
GITHUB_REPOSITORY: 'docker/setup-docker-action',
|
|
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: {
|
|
'^.+\\.ts$': 'ts-jest'
|
|
},
|
|
moduleNameMapper: {
|
|
'^csv-parse/sync': '<rootDir>/node_modules/csv-parse/dist/cjs/sync.cjs'
|
|
},
|
|
collectCoverageFrom: ['src/**/{!(main.ts),}.ts'],
|
|
coveragePathIgnorePatterns: ['lib/', 'node_modules/', '__mocks__/', '__tests__/'],
|
|
verbose: true
|
|
};
|