0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00
logto/packages/ui/jest.config.ts
simeng-li 86030ab97c
feat(ui): implement phonenumber input field (#372)
* feat(ui): implement phonenumber input field

implement phonenumber input field

* fix(ui): phone input ui fix

phone input ui fix

* fix(ui): should not show error if not interacted

should not show error if not interacted

* fix(ui): fix styling

fix styling

* feat(ui): add typeMode for phone input

add typeMode for phone input

* chore(ui): update pnpm-lock

update pnpm-lock
2022-03-15 17:31:13 +08:00

30 lines
828 B
TypeScript

import type { Config } from '@jest/types';
const config: Config.InitialOptions = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
transform: {
// Enable JS/JSX transformation
'\\.(ts|js)x?$': 'ts-jest',
'\\.(svg)$': 'jest-transform-stub',
},
transformIgnorePatterns: [
'[/\\\\]node_modules[/\\\\]((?!ky[/\\\\]).)+\\.(js|jsx|mjs|cjs|ts|tsx)$',
],
moduleNameMapper: {
// Map path alias in `tsconfig.json`
'@/(.*)': '<rootDir>/src/$1',
// Mock CSS Modules
'\\.module\\.(css|sass|scss)$': 'identity-obj-proxy',
},
setupFilesAfterEnv: ['<rootDir>/src/jest.setup.ts'],
coveragePathIgnorePatterns: ['/node_modules/', '/dist/'],
coverageReporters: ['text-summary', 'lcov'],
globals: {
'ts-jest': {
tsconfig: './tsconfig.test.json',
},
},
};
export default config;