xref: /expo/docs/jest.config.js (revision 2acbb82d)
1const nextJest = require('next/jest');
2
3/** @type {import('@jest/types').Config.InitialOptions} */
4const jestConfig = {
5  displayName: 'docs',
6  testEnvironment: 'jsdom',
7  testMatch: ['**/*.test.(js|ts|tsx)'],
8  setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect', './jest.setup.js'],
9  clearMocks: true,
10  coverageDirectory: '<rootDir>/coverage',
11  moduleNameMapper: {
12    '^~/(.*)$': '<rootDir>/$1',
13  },
14};
15
16module.exports = nextJest({ dir: './' })(jestConfig);
17