1
0
Files
build-push-action/jest.config.js
T

30 lines
895 B
JavaScript
Raw Normal View History

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