generated from GabrielGuedess/NextJs-Boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
25 lines (22 loc) · 652 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const nextJest = require('next/jest');
const createJestConfig = nextJest({
dir: './',
});
const customJestConfig = {
testEnvironment: 'jsdom',
testPathIgnorePatterns: ['/node_modules/', '/.next/'],
collectCoverage: true,
collectCoverageFrom: [
'src/**/*.ts(x)?',
'!src/**/stories.tsx',
'!src/pages/**/*.tsx',
'!src/styles/**/*.ts',
'!src/hooks/**/*.ts(x)?',
'!src/contexts/**/*.ts(x)?',
'!src/storage/**/*.ts',
'!src/utils/tests/*.ts(x)?',
],
setupFilesAfterEnv: ['<rootDir>/.jest/setup.ts'],
modulePaths: ['<rootDir>/src/', '<rootDir>/.jest'],
};
module.exports = createJestConfig(customJestConfig);