repo_description: 🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.
repo_topics: apollographql express express-graphql graphql graphql-schema graphql-server hapi koa node resolvers restify
code: import { defaults } from 'jest-config';
  import { createRequire } from 'node:module';
  
  export default {
    testEnvironment: 'node',
    setupFilesAfterEnv: ['<rootDir>/../../jest.setup.js'],
    preset: 'ts-jest',
    testMatch: null,
    testRegex: '/__tests__/.*\\.test\\.(js|ts)$',
    testPathIgnorePatterns: ['/node_modules/', '/dist/'],
    moduleFileExtensions: [...defaults.moduleFileExtensions, 'ts', 'tsx'],
    clearMocks: true,
    transform: {
      '^.+\\.test.ts$': [
        'ts-jest',
        {
          tsconfig: '<rootDir>/src/__tests__/tsconfig.json',
          diagnostics: true,
        },
      ],
    },
    moduleNameMapper: {
      // Ignore '.js' at the end of imports; part of ESM support.
      '^(\\.{1,2}/.*)\\.js$': '$1',
    },
  };
  