Add tests for useFormError hook and FormField component
- Introduced `useFormError.test.tsx` to validate error handling, server error integration, and form behavior. - Added `FormField.test.tsx`, covering rendering, accessibility, error handling, and prop forwarding. - Updated Jest coverage exclusions to include `middleware.ts` (no logic to test).
This commit is contained in:
@@ -28,6 +28,7 @@ const customJestConfig = {
|
||||
'!src/app/**', // Next.js app directory - layout/page files (test in E2E)
|
||||
'!src/**/index.{js,jsx,ts,tsx}', // Re-export index files - no logic to test
|
||||
'!src/lib/utils/cn.ts', // Simple utility function from shadcn
|
||||
'!src/middleware.ts', // middleware.ts - no logic to test
|
||||
],
|
||||
coverageThreshold: {
|
||||
global: {
|
||||
|
||||
Reference in New Issue
Block a user