mirror of
https://github.com/docker/metadata-action.git
synced 2024-10-04 08:51:10 +00:00
b5c378621c
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
32 lines
881 B
TypeScript
32 lines
881 B
TypeScript
import fs from 'fs';
|
|
import os from 'os';
|
|
import path from 'path';
|
|
|
|
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-metadata-action-'));
|
|
|
|
process.env = Object.assign({}, process.env, {
|
|
TEMP: tmpDir,
|
|
GITHUB_REPOSITORY: 'docker/metadata-action',
|
|
RUNNER_TEMP: path.join(tmpDir, 'runner-temp'),
|
|
RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache')
|
|
}) as {
|
|
[key: string]: string;
|
|
};
|
|
|
|
module.exports = {
|
|
clearMocks: true,
|
|
testEnvironment: 'node',
|
|
moduleFileExtensions: ['js', 'ts'],
|
|
setupFiles: ['dotenv/config'],
|
|
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
|
|
};
|