forked from clerk/javascript
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
22 lines (21 loc) · 842 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
const { name } = require('./package.json');
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tsconfig');
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
globals: {
PACKAGE_NAME: '@clerk/elements',
PACKAGE_VERSION: '0.0.0-test',
__DEV__: false,
},
displayName: name.replace('@clerk', ''),
injectGlobals: true,
roots: ['<rootDir>'],
testMatch: ['**/?(*.)+(spec|test).+(ts|tsx|js)'],
testEnvironment: 'jsdom',
transform: { '^.+\\.m?tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }] },
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testPathIgnorePatterns: ['/node_modules/', '/jest/', '/.turbo', '/dist/', '/examples'],
modulePaths: [compilerOptions.baseUrl],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths),
};