mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
2319101056
Rename `ui` to `experience`.
36 lines
1 KiB
TypeScript
36 lines
1 KiB
TypeScript
import type { Config } from '@jest/types';
|
|
|
|
const config: Config.InitialOptions = {
|
|
roots: ['<rootDir>/src'],
|
|
testEnvironment: 'jsdom',
|
|
setupFilesAfterEnv: ['<rootDir>/src/jest.setup.ts'],
|
|
collectCoverageFrom: ['**/*.{js,jsx,ts,tsx}'],
|
|
coveragePathIgnorePatterns: ['/node_modules/', '/src/__mocks__/', '/src/include.d/'],
|
|
coverageReporters: ['text-summary', 'lcov'],
|
|
transform: {
|
|
'^.+\\.(t|j)sx?$': [
|
|
'@swc/jest',
|
|
{
|
|
sourceMaps: true,
|
|
jsc: {
|
|
transform: {
|
|
react: {
|
|
runtime: 'automatic',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
'\\.(svg)$': 'jest-transformer-svg',
|
|
'\\.(png)$': 'jest-transform-stub',
|
|
},
|
|
moduleNameMapper: {
|
|
'^@/(.*)$': '<rootDir>/src/$1',
|
|
'^@logto/app-insights/(.*)$': '<rootDir>/../app-insights/lib/$1',
|
|
'^@logto/shared/(.*)$': '<rootDir>/../shared/lib/$1',
|
|
'\\.module\\.(css|sass|scss)$': 'identity-obj-proxy',
|
|
},
|
|
transformIgnorePatterns: ['node_modules/(?!(.*(nanoid|jose|ky|@logto|@silverhand))/)'],
|
|
};
|
|
|
|
export default config;
|