/** @type {import('jest').Config} */ const config = { testEnvironment: 'jsdom', preset: 'ts-jest', transform: { '^.+\\.(ts|tsx)$': [ 'ts-jest', { tsconfig: { jsx: 'react-jsx', }, }, ], }, moduleNameMapper: { '\\.(css|less|scss|sass)$': '/__mocks__/styleMock.js', '^react-force-graph-2d$': '/__mocks__/react-force-graph-2d.js', '^next/dynamic$': '/__mocks__/next-dynamic.js', '^next/navigation$': '/__mocks__/next-navigation.js', }, testMatch: [ '/src/__tests__/**/*.test.ts', '/src/__tests__/**/*.test.tsx', ], testPathIgnorePatterns: ['/node_modules/', '/.next/'], setupFilesAfterEnv: ['/jest.setup.ts'], }; module.exports = config;