18 lines
598 B
TypeScript
18 lines
598 B
TypeScript
|
import nextJest from 'next/jest'
|
||
|
|
||
|
const customConfig = {
|
||
|
moduleDirectories: ['node_modules', '<rootDir>/'],
|
||
|
setupFilesAfterEnv: ['<rootDir>/test/setup.ts'],
|
||
|
transform: {
|
||
|
'^.+\\.(t|j)sx?$': 'ts-jest',
|
||
|
},
|
||
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
||
|
moduleNameMapper: {
|
||
|
// Force module uuid to resolve with the CJS entry point, because Jest does not support package.json.exports. See https://github.com/uuidjs/uuid/issues/451
|
||
|
uuid: require.resolve('uuid'),
|
||
|
three: require.resolve('three'),
|
||
|
},
|
||
|
}
|
||
|
|
||
|
export default nextJest({ dir: './' })(customConfig)
|