forked from vercel/swr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
21 lines (21 loc) · 852 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
module.exports = {
testEnvironment: 'jsdom',
testRegex: '/test/.*\\.test\\.tsx?$',
testPathIgnorePatterns: ['/node_modules/', '/e2e/'],
modulePathIgnorePatterns: ['<rootDir>/examples/'],
setupFilesAfterEnv: ['<rootDir>/test/jest-setup.ts'],
moduleNameMapper: {
'^swr$': '<rootDir>/src/index/index.ts',
'^swr/infinite$': '<rootDir>/src/infinite/index.ts',
'^swr/immutable$': '<rootDir>/src/immutable/index.ts',
'^swr/subscription$': '<rootDir>/src/subscription/index.ts',
'^swr/mutation$': '<rootDir>/src/mutation/index.ts',
'^swr/_internal$': '<rootDir>/src/_internal/index.ts',
},
transform: {
'^.+\\.(t|j)sx?$': ['@swc/jest']
},
coveragePathIgnorePatterns: ['/node_modules/', '/dist/', '/test/'],
coverageReporters: ['text', 'html'],
reporters: [['github-actions', { silent: false }], 'summary']
}