const nextJest = require('next/jest'); const createJestConfig = nextJest({ dir: './' }); module.exports = createJestConfig({ setupFilesAfterEnv: ['/jest.setup.ts'], // Custom environment that extends jest-environment-jsdom and polyfills the // native Node 18+ Fetch API so tests can use jest.spyOn(global, 'fetch'). testEnvironment: '/jest.environment.js', testMatch: ['**/*.test.tsx', '**/*.test.ts'], });