import nextJest from 'next/jest.js' const createJestConfig = nextJest({ // Provide the path to your Next.js app to load next.config.js and .env files in your test environment dir: './', }) const config = { setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect'], testEnvironment: 'jsdom', } export default createJestConfig(config)