const nextJest = require('next/jest') /** @type {import('jest').Config} */ const createJestConfig = nextJest({}) // Add any custom config to be passed to Jest const config = { coverageProvider: 'v8', testEnvironment: 'jsdom', // Add more setup options before each test is run // setupFilesAfterEnv: ['/jest.setup.ts'], } // createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async module.exports = createJestConfig(config)