chore: moves dev folder to top, establishes new test pattern
This commit is contained in:
@@ -1,18 +1,24 @@
|
||||
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',
|
||||
'payload-config': '<rootDir>/__mocks__/payload-config.ts',
|
||||
},
|
||||
testEnvironment: 'node',
|
||||
// testEnvironment: 'node',
|
||||
testMatch: ['<rootDir>/packages/payload/src/**/*.spec.ts', '<rootDir>/test/**/*int.spec.ts'],
|
||||
testTimeout: 90000,
|
||||
transform: {
|
||||
'^.+\\.(t|j)sx?$': ['@swc/jest'],
|
||||
},
|
||||
// transform: {
|
||||
// '^.+\\.(t|j)sx?$': ['@swc/jest'],
|
||||
// },
|
||||
verbose: true,
|
||||
}
|
||||
|
||||
module.exports = customJestConfig
|
||||
module.exports = createJestConfig(customJestConfig)
|
||||
|
||||
Reference in New Issue
Block a user