forked from clerk/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
41 lines (37 loc) · 1.16 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
32
33
34
35
36
37
38
39
40
41
/** @type {import('ts-jest').JestConfigWithTsJest} */
const config = {
displayName: 'clerk-js',
injectGlobals: true,
testEnvironment: '<rootDir>/jsdom-with-timezone.ts',
roots: ['<rootDir>/src'],
setupFiles: ['./setupJest.ts'],
setupFilesAfterEnv: ['./setupJestAfterEnv.ts'],
testRegex: [
'/__tests__/(.+/)*.*.test.[jt]sx?$',
'/ui/.*/__tests__/.*.test.[jt]sx?$',
'/(core|utils)/.*.test.[jt]sx?$',
],
testPathIgnorePatterns: ['/node_modules/'],
collectCoverage: false,
coverageProvider: 'v8',
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: ['/node_modules/'],
// collectCoverageFrom: [
// '**/*.{js,jsx,ts,tsx}',
// '!**/*.d.ts',
// '!**/index.ts',
// '!**/index.browser.ts',
// '!**/index.headless.ts',
// '!**/index.headless.browser.ts',
// '!**/coverage/**',
// '!**/dist/**',
// '!**/node_modules/**',
// ],
moduleDirectories: ['node_modules', '<rootDir>/src'],
transform: {
'^.+\\.m?tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json', diagnostics: false }],
// '^.+\\.m?tsx?$': ['@swc/jest'],
'^.+\\.svg$': '<rootDir>/svgTransform.js',
},
};
module.exports = config;