Files
login-action/jest.config.js
T

30 lines
870 B
JavaScript
Raw Normal View History

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