forked from cardosofelipe/fast-next-template
- Updated test components (`PasswordResetConfirmForm`, `PasswordChangeForm`) to use i18n keys directly, ensuring accurate validation messages. - Refined translations in `it.json` to standardize format and content. - Replaced text-based labels with localized strings in `PasswordResetRequestForm` and `RegisterForm`. - Introduced `generateLocalizedMetadata` utility and updated layout metadata generation for locale-aware SEO. - Enhanced e2e tests with locale-prefixed routes and updated assertions for consistency. - Added comprehensive i18n documentation (`I18N.md`) for usage, architecture, and testing.
21 lines
759 B
TypeScript
21 lines
759 B
TypeScript
/**
|
|
* Type declarations for test mocks
|
|
* Augments modules to include mock exports for testing
|
|
*/
|
|
|
|
// Augment next-intl/navigation to include mock exports without removing original exports
|
|
declare module 'next-intl/navigation' {
|
|
// Re-export all original exports
|
|
export * from 'next-intl/dist/types/navigation.react-client';
|
|
|
|
// Explicitly export createNavigation (it's a named export of a default, so export * might miss it)
|
|
export { createNavigation } from 'next-intl/dist/types/navigation/react-client/index';
|
|
|
|
// Add mock exports for testing
|
|
export const mockUsePathname: jest.Mock;
|
|
export const mockPush: jest.Mock;
|
|
export const mockReplace: jest.Mock;
|
|
export const mockUseRouter: jest.Mock;
|
|
export const mockRedirect: jest.Mock;
|
|
}
|