WellNuo/packages/@wellnuo/ui/jest.config.js
Sergei 5dc348107a Add shared UI library (@wellnuo/ui)
Created a comprehensive shared UI component library to eliminate code
duplication across WellNuo apps (main app and WellNuoLite).

## Components Added
- Button (merged features from both apps - icons, 5 variants, shadows)
- Input (with left/right icons, password toggle, error states)
- LoadingSpinner (inline and fullscreen variants)
- ErrorMessage & FullScreenError (with retry/skip/dismiss actions)
- ThemedText & ThemedView (theme-aware utilities)
- ExternalLink (for opening external URLs)

## Design System
- Exported complete theme system (colors, spacing, typography, shadows)
- 73+ color definitions, 7 spacing levels, 8 shadow presets
- Consistent design tokens across all apps

## Infrastructure
- Set up npm workspaces for monorepo support
- Added comprehensive test suite (41 passing tests)
- TypeScript configuration with strict mode
- Jest configuration for testing
- README and migration guide

## Benefits
- Eliminates ~1,500 lines of duplicate code
- Ensures UI consistency across apps
- Single source of truth for design system
- Easier maintenance and updates
- Type-safe component library

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-31 18:00:24 -08:00

22 lines
707 B
JavaScript

module.exports = {
preset: 'jest-expo',
transformIgnorePatterns: [
'node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)'
],
setupFilesAfterEnv: ['<rootDir>/../../../jest.setup.js'],
moduleNameMapper: {
'^@wellnuo/ui$': '<rootDir>/src/index.ts',
'^@wellnuo/ui/(.*)$': '<rootDir>/src/$1'
},
testMatch: [
'**/__tests__/**/*.test.[jt]s?(x)',
'**/?(*.)+(spec|test).[jt]s?(x)'
],
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/**/*.d.ts',
'!src/**/__tests__/**',
'!src/index.ts'
]
};