import type { Config } from 'jest';
import path from 'path';

process.env.DATA_MOUNT_POINT = path.join(__dirname, '..', '..', 'test-components');
process.env.SQUIZ_REGION = 'au';
process.env.DEPLOYMENT_ENVIRONMENT = 'dev';

// Sync object
const config: Config = {
  preset: 'ts-jest',
  testTimeout: 60_000,
  testEnvironment: 'node',
  passWithNoTests: true,
  testPathIgnorePatterns: [
    '<rootDir>/lib/',
    '<rootDir>/src/integration-tests',
    '<rootDir>/src/test.ts',
    '.*\\.integration\\.spec\\.ts$',
  ],
  maxWorkers: 1,
  globals: {
    'ts-jest': {
      tsconfig: 'tsconfig.json',
    },
  },
};

export default config;
