forked from NangoHQ/nango
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
31 lines (31 loc) · 1.03 KB
/
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
26
27
28
29
30
31
export default {
collectCoverageFrom: ['<rootDir>/src/**/*.{ts,tsx}', '!<rootDir>/src/**/*.{spec,test}.{ts,tsx}'],
projects: [
{
displayName: 'browser',
testURL: 'http://localhost/',
testEnvironment: 'jsdom',
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testRegex: '(.*/src/clients/.*)((test|spec))\\.(jsx?|tsx?)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
modulePathIgnorePatterns: ['<rootDir>/dist/'],
setupFiles: ['jest-localstorage-mock'],
verbose: true,
},
{
displayName: 'backend',
setupFiles: ['<rootDir>/jestSetup.js'],
testEnvironment: 'jsdom',
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testRegex: '(.*/src/lib/.*)(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
modulePathIgnorePatterns: ['<rootDir>/dist/'],
testPathIgnorePatterns: ['/node_modules/', '/views/', '/legacy/'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
verbose: true,
},
],
}