mirror of
https://github.com/mantinedev/next-app-template.git
synced 2025-11-09 20:12:02 +10:00
17 lines
400 B
JavaScript
17 lines
400 B
JavaScript
const nextJest = require('next/jest');
|
|
|
|
const createJestConfig = nextJest({
|
|
dir: './',
|
|
});
|
|
|
|
const customJestConfig = {
|
|
setupFilesAfterEnv: ['<rootDir>/jest.setup.cjs'],
|
|
moduleNameMapper: {
|
|
'^@/components/(.*)$': '<rootDir>/components/$1',
|
|
'^@/pages/(.*)$': '<rootDir>/pages/$1',
|
|
},
|
|
testEnvironment: 'jest-environment-jsdom',
|
|
};
|
|
|
|
module.exports = createJestConfig(customJestConfig);
|