// const nextJest = require('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 customJestConfig = { extensionsToTreatAsEsm: ['.ts', '.tsx'], globalSetup: './test/jest.setup.ts', moduleNameMapper: { '\\.(css|scss)$': '/test/helpers/mocks/emptyModule.js', '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '/test/helpers/mocks/fileMock.js', '^(\\.{1,2}/.*)\\.js$': '$1', }, testEnvironment: 'node', testMatch: ['/packages/payload/src/**/*.spec.ts', '/test/**/*int.spec.ts'], testTimeout: 90000, transform: { '^.+\\.(t|j)sx?$': ['@swc/jest'], }, verbose: true, } // module.exports = createJestConfig(customJestConfig) export default customJestConfig