jest.config.js 475 B

1234567891011
  1. module.exports = {
  2. //testEnvironment: 'node',
  3. preset: 'ts-jest',
  4. setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
  5. transform: { '^.+\\.(t|j)sx?$': 'ts-jest' },
  6. testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
  7. moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
  8. testPathIgnorePatterns: ['<rootDir>/.next/', '<rootDir>/node_modules/'],
  9. globals: { 'ts-jest': { 'ts-config': '<rootDir>/tsconfig.jest.json' } }
  10. }
  11. console.log('loaded.')