Files
payload/jest.config.js
2024-02-15 10:01:13 -05:00

22 lines
757 B
JavaScript

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 = {
globalSetup: './test/jest.setup.ts',
moduleNameMapper: {
'\\.(css|scss)$': '<rootDir>/packages/payload/src/bundlers/mocks/emptyModule.js',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/packages/payload/src/bundlers/mocks/fileMock.js',
},
// testEnvironment: 'node',
testMatch: ['<rootDir>/packages/payload/src/**/*.spec.ts', '<rootDir>/test/**/*int.spec.ts'],
testTimeout: 90000,
verbose: true,
}
module.exports = createJestConfig(customJestConfig)